Every time your dog pees or poops outside it needs to be celebrated. Give them baby talk or a treat, jump up & down, pat their little heads & remind them of how brilliant that decision was. Yes it might look silly, but your pup needs to know he’s done the best thing ever. When you consistently praise your puppy for going potty outside they’ll start to understand that it’s the correct decision, and one that leads to super fun happy time.
To break this habit, you will have to get up very early one morning (when you have plenty of time), and get your puppy out on a walk before it has had its morning wee. You should not bring it home until it has been forced to go out of desperation. If however, you are unsuccessful, and your puppy has not toileted, then take it immediately into the garden on your return, or you risk it relieving itself indoors. Need more help? Follow these additional puppy training tips (e.g. socialisation techniques to prevent behavioural problems) or visit the Puppy Socialisation Plan website.
The process is the exactly same for older dogs as it is for puppies; prevent accidents from happening by using baby gates and a crate if possible, create a predictable schedule, learn to recognize your dog’s potty signals, accompany your dog outside and immediately reward for all outdoor elimination, properly clean any accidents and supervise your dog until you’re sure that he understands the rules.