1) Your enemies have to get to you. Make it difficult.
One of the things that stood out to me during the defense of Hilltop was the barricade the militia set up in preparation for the Whisperers’ attack; A tangled mess of thorns and brush meant to slow down the Whisperers’ horde of walkers.
Honestly, it was…okay. I mean, it didn’t hold the horde off for that long, and, being mostly wood and thorns, it could withstand Alpha’s second phase of attack (Which I’ll get to later), but, it did slow the horde down a little, hence, the rating of “okay”.
Do you know what would have made that better? If the walkers had to make their way through a trench to get to the barricade, first.
Realistically, whether you’re fighting zombies or hostiles, there is little chance that they’ll be attacking you from anything but on land, so, this gives you, potentially, an advantage. If your enemy is coming to you, you can make the mere act of doing that very costly, by digging trenches, moats, or pits and lining them with spikes or similar hazards.
Either the dead will get themselves trapped or impaled on the spikes, or the living will be forced to bridge the gap, leaving them vulnerable.