Anyone living in a wormhole for more than a day or two needs to put up a POS. By putting something up you are inviting the destructive-minded to try and take it down so let's look at how to defend a POS effectively. This isn't just mean it can be profitable too as when they kill your POS some of the stuff may fall out.
Your first point of decision is POS size.
Large POS fuel cost 500m/month
Medium POS fuel cost 250m/month
Small POS fuel cost 125m/month
A large POS gives you room for a Corp Maintenance Hangar, a Ship Maintenance Array (both pretty essential for storage), a couple of other big POS modules plus a ton of defences. Properly set up, scouts will take one look at your POS then tell their team don't bother. A larger POS also gives you a bigger forcefield, a minor defensive advantage.
A medium POS gives you room for the essential storage facilities plus quite a lot of defensive modules. It's a reasonable choice for a base, especially in a class 1 or class 2 hole where it's harder to get decent POS bashers inside. You won't really have room for things like labs or refineries.
A small POS gives you room for not a lot. One viable tactic though is just to put a stronted small POS with storage up then evac if anyone challenges you. You've invested very little. I guess you could offline storage to put some defences online but anyone prepared to have a go at a POS will laugh at a small one, no matter how you defend it.
Caldari POSes give you less grid, more CPU and a -75% bonus to ECM jammer cycle time. Less grid is bad because defences are mostly grid, as is storage. ECM jammers are wonderful and this bonus multiplies them by 4. I picked a Caldari Large POS.
Amarr POSes give you bonuses to lasers and silos. Much as I love lasers just for the Dr Evil pronunciation of the word they're not really all that good. Silos are for moon mining or reacting, the first of which is impossible in w-space, the second of which unlikely.
Gallente POSes give you bonuses to hybrid guns and silos.
Minmatar POSes give you bonuses to projectile guns, probably the best type.
Faction POSes are slightly better but have the disadvantage that they're much more prestigious to kill. You don't want to encourage people to kill your POS. They're also much more expensive - a double disadvantage in that not only does it cost you more but the other guys gain more kill board isk efficiency if they kill it.
POS defensive modules come in two types: e war and modules that shoot people. Of the modules that shoot people missiles stop working if the POS is reinforced and thus should never be used. The other guns are decent, I quite like Minmatar guns. All gun POS modules take the next size up of ammo, in other words a small POS battery takes medium projectile ammo. I just use plain Tech 1 ammo.
POS e war modules are delightful, screwing with attackers is the best way to achieve our goal - defending the POS. Killing someone isn't necessarily as annoying as blueballing them. If someone attacks a POS in a wormhole they are probably either ludicrously space rich or getting full ship reimbursement so although it's inconvenient if you kill them it's not utterly disastrous. But if they're sat there for 10 minutes permajammed they'll want to give up.
The ewar modules I like are warp jammers (which should always be part of any POS defence - you won't kill people if they can just warp off), stasis webifiers (it can be useful to slow boat), neuts and the king of blueballing POS defences: ECM jammers.
Defensive modules must be anchored outside the forcefield. A large POS has a 30km radius shield and a maximum anchor range of 50km. You want to place your modules as far from each other as possible. When someone attacks your POS they will shoot out selected defences one by one. So they will warp in and start shooting and once they've killed one they'll pick a new target, preferably something within optimal range. So your module placement is aiming to deny them good targets within optimal range from one of your other modules.
Put a module in your indy and slowboat out to 49 km. (No point using anything flasher than an unrigged indy, this is a dangerous time). Drop your first defence. Orbit the POS at current range which will be 49km. When you get to about 20-25km from the first module drop another defence of a different type. Keep orbiting around your POS dropping modules. Once you've orbited around the equator orbit around the poles. If you have made a ring of defences around the equator plus a ring north to south around the poles and you still have modules to drop you can drop them 90 degrees off the equator. No module should be near another module.
An efficient attacker will bookmark spots near priority modules in a cloaked cov ops while the task force burns down defences one by one but even that's much more trouble than just being able to warp in and cherry pick which of your defences die first. (And of course your Warp Jammer batteries may stop some ships from warping out).
My POS has [redacted] loads of ECM. If I get attacked by someone like Revenge of the Liquidators I'm quite sure they wouldn't grind down the POS as they would have a small force of elite ships. Even if they fit ECCMs there's so many batteries that they'll not do much plus spider tanking would be very problematic. There are a handful of guns and of course warp jammers so if people come and get permajammed they'll all die. At some point I'll log in and find lots of nice wrecks just outside the shield.
If I were expecting to ambush people who attacked the POS, rather than let the POS do all the work I'd have instead set it up with Neuts and Guns. This is a more aggressive style, potentially leaving them dead in the water for my small gang to attack.
Either form of defence is arguably more viable than just sticking on tons of guns.
Here's a view from inside my POS, showing how spaced out the modules are (they're actually a little to close, about 35 to 39 km from the tower, I was newbier when I set it up).
Once you have your POS modules set up you may wish to place some decloaking cans. There are cans you can anchor in space. Many cov ops will warp to or near the sun to start scanning (which makes some sense as it's the centre of the system) then may warp to your moon from there. Or they may be warping moon by moon. So if you're at Planet V Moon 14 anchor a can where someone will land on it (and hopefully get decloaked and shot) if coming from the Sun or from Planet V Moon 13 or Moon 15. Drop cans to cover warp to within 100, 70 and 50. If they lack a backup explorer a lucky decloak could trap a whole fleet in your wormhole.
In the Management window of the control tower set your POS to shoot anyone with Standing less than 0.1, ie any non-blue. Be careful to blue any alts or friends that may visit your POS.
Stront your POS to come out of reinforced in about 1 day 12 hours. This means that it comes out in their downtime after their way in has closed. If they attacked you at a sociable hour of 7 in the evening on a Saturday they will have to organise a 7am Monday morning POS bash to finish you off.
A pro tip regarding POS defence is that you can offline other modules to put defences online. This is especially useful in a small or a medium pos (although anyone trying to defend a small POS is mad). You can even come back to a trashed POS that has been put into reinforced mode, pull a load of modules out of the corp hangar and spend an afternoon anchoring them for when the bastards come back to finish you off.
Another tip: don't talk. Pretty well every pvper in Eve is to some extent a social engineer. Anything you say will be seen as an opening to extort you, trick you, initimidate you or extract comic whining from you. Anything you say is entertainment. It also allows them to Show Info and start collecting intel and to add you to their watch lists so they know when you log in or out. Don't talk when defending. (Trashing people on a roam is totally different and part of the fun of Eve).
POS defence is a wonderful opportunity for small gang warfare. Prepare defensive warp ins and perches around the POS. As a minimum you should have
- a safe spot outside D scan radius.
- a safe spot just offgrid
- warp ins to your most likely targeted modules (your warp jammer batteries, anything you have only a few of like if you have just 2 neuts).
- warp ins around any currently active wormholes.
Catch them while they're jammed, scrammed and neuted and you get free kills to boost your epeen with.
Lastly in the words of a very wise player: don't anchor what you can't afford to lose.