It’s been said that software is the most complicated thing human beings have ever created. I’m not sure if an operating system is more complex than the (software designed) processor on which it runs, but I do know that modern operating systems are so complex that no single human could hope to hold every part in their mind. The same is true of other software and software ecosystems.
WordPress is not as complex as an operating system like Linux, but it lies at the center of an ecosystem that comprises thousands of plugins and themes, each of which adds code to a WordPress installation. That code communicates with WordPress via well-understood APIs, but the ecosystem of plugins, themes, and WordPress Core creates a combinatorial explosion of possible configurations. And, although developers try to foresee as many of the potential issues as possible, it’s all but impossible to guarantee that no combination will cause an error that will prevent a site from functioning properly.
If you don’t test WordPress plugins and themes before you install them on your production site, you run a serious risk of downtime or broken functionality: perhaps a cache plugin will interact poorly with an affiliate marketing solution; perhaps a slider upgrade will break a page’s layout. If you don’t test plugin and theme upgrades and installations before you install them on your production site, you may regret the results.
Creating A WordPress Testing Environment
There are any number of ways to create a WordPress testing environment on a local machine. I’m going to take a brief look at two of the easiest to use.
DesktopServer is an application dedicated to creating local WordPress testing environments. It allows users to quickly create a fully functioning WordPress installation on their local machine with the click of a button. Desktop Server will install a full LAMP stack with WordPress, which can then be interacted with in the same way you would interact with a standard server-installed WordPress installation.
One of the best features of Desktop Server is its ability to copy a site, making it easy to create a test environment that closely mimics the production environment.
If you need to test WordPress installations, and don’t want to tangle with the command line, DesktopServer is the best option.
Vagrant is a tool for automatically building and configuring development environments. VagrantPress is a Vagrant package that will automatically install and configure a WordPress environment. It creates a virtual machine on your local machine and runs WordPress and its associated software stack within the VM. Vagrant is more complex to use than DesktopServer, it requires some setup, including the installation of VirtualBox, and it’s managed via the command line, but if you have complex WordPress testing requirements with a need for multiple test environments, VagrantPress is a solid option.
Whichever WordPress testing environment you ultimately choose, it’s important that you are diligent about testing the plugins and themes you install on your site. Most of the time, they’ll be fine, but sometimes, the test will catch an incompatibility that might lead to a catastrophic failure of your site.