If you develop WordPress or want a higher level of security then you need a virtual copy of your server in production. wpCop explains why.
Maybe you already have a PC or Mac-based development server? If not, here are three reasons why you should:
- Develop themes more easily before uploading to the live production server
- Test compatibility of WordPress and plugin upgrades plus new code
- Ultimately, because it's better to screw up a beta site than a live site!
So what sort of local setup is best? There are examples aplenty, XAMPP from Apache Friends being the most easily installed, user-friendly, cross-platform candidate:
That's a fair bet for most of us with its Apache, MySQL, and PHP configurations largely matching those we can, to a greater or lesser extent, tweak on the live box itself. But what about unmanaged hosting users, who would ideally mimic the remote box locally, as well as for all of us wanting to max out on best security practices for site development? In these cases, setting up just any old local server isn't a bad idea, it just isn't the best idea.
Using a virtual machine
In terms of site-server development, a virtual machine – or VM – is particularly practical because we can match, near as damn it, every last detail of the actual remote setup. This is close to perfection. In addition to the previous points, have some more:
- Copy web files and db to the VM to assist backup while preserving the twin
- Develop sites for a live server's exact setup to assist with compatibility
- Edit web files on a guest VM from, say, Dreamweaver on the host PC
- Set up and test site-server security measures before trusting them live
- Revert unwanted VM site-server changes, restoring from a snapshot
- Clone a VM to more PCs, give SSH access, and WordPress browser access
- Meanwhile, on the live production server, cut possible downtime to the bone
- Get generally far too excited and wonder why you'd not done this years ago
You may recall that we used a VM as an advanced sandbox back in the good old days of Anti-Malware: Almost Perfect PC Solution so take another look at that, clicking through the links there. Really.