Get him used to staying in a crate. Take him out of the crate after a few hours and take him outside. As soon as he pisses or shits reward him with a treat and pet him so he knows he did something good. Works like a charm and most trainers recommend this as well.
I used this method and it worked. I also used this method just to reinforce behaviours. My pup is now 16 weeks and has no need for the crate as he has a good idea of what is right and what is wrong.
Consistency is the key - Create a daily routine and stick to it (at least for the time being).
A dog will always tend to return to their scented areas. Make sure those are outside by relocating any droppings. I've used the attractant sprays in the past with some success - It at least helped create a spot, then after a while of me leading the dog back to it, he ended up getting it on his own with my help. Without the spray, he wasn't so keen on that particular area.
Do not strike the animal for poor bathroom behaviors - This doesn't work, period. Regardless of how frustrated you are.
Set a schedule and be consistent. Take them out regularly. For about the first two weeks if my dog was out, I would sit in the floor with him and play, so if he started sniffing I could get him quickly outside. And once they do go outside, praise them really good.
Don't let it in the house all the way. First cage off the kitchen. When you take it outside to pee. Reward with very small training treats. Then let it in the house to play then back in the kitchen. When the dog has learned then let it all the way in the house but keep bedrooms closed....later open bedrooms.
Try to think like a dog not a human. Take them out when they wake up, every couple hours, after thy eat, after they play. Taking a scared new puppy and throwing them out into your yard(the wilderness) alone and thinking they know what to do when they are alone and scared is not going to work a lot of the time. And if your yard is secluded take a piss your self and they will smell it and mark that territory.
Three things that mostly everybody already mentioned: consistency is key, reward good behavior and don’t strike or punish the dog for bad behavior. Most dogs are food driven, so put them in the grass and say you’re key word before, during and after they do their business. Then reward them with a treat and say the key word a couple of more times. This we reinforce the good behavior. Also, I have a key phrase like “go outside” or “go potty” and I use it religiously while training. They will associate that word with going potty and then they’ll know a treat is coming. This rewarding good behavior tactic isn’t just for potty training but for everything else you want the puppy to do correctly.