Top 8 Best Ways to Set Up a Testing Environment for WordPress

Testing environments provide an easy and relatively inexpensive way to test themes, plugins and even new releases of WordPress without breaking your live site.

Many site admins take advantage of these environments where they can do thorough testing before committing changes to a site. If you’ve ever activated a new plugin or upgraded to a new version of WordPress only to find errors on your site, you will know the importance of testing first.

There are many ways you can set up a test environment, but the easiest by far are localhost environments or cloning your site on your existing web hosting account.

In this post I’ve put together a collection of some of the best testing environments available for WordPress, including options for both Windows and OS X. Most of the options are for setting up a localhost, but there are also options for duplicating a live site.

P.S. WPMU DEV will soon be announcing a plugin that will join the list below. Stay tuned.

MAMP

mamp

MAMP (which stands for Macintosh, Apache, MySQL and PHP) lets you set up a localhost environment on OS X. Version 3 of the software has been released and there’s also a beta version available for Windows.

We recently published a great guide to setting up MAMP on the blog, which walks you through installing the program, basic MAMP configuration, creating a MySQL database, and installing WordPress. The post includes optional steps for setting up Multisite.

MAMP is free, but there’s also a premium version available multi-PHP, the ability to set up any number of virtual servers, and the option to install WordPress automatically.

XAMPP

xampp

XAMPP is a popular, free and open source localhost PHP development environment available for Windows, OS X and Linux.

We also recently published a tutorial on setting up XAMPP, which guides you through set up, using the XAMPP control panel, setting up a MySQL database, installing WordPress and setting up Multisite.

The Apache Friends website includes a fantastic forum for users who run into trouble and need some help. I ran into a few problems with setting up the software (mostly firewall issues) and was able to quickly search the forums for a solution.

DesktopServer

desktop-server

Desktop Server is so easy to set up it can take as little as 5 minutes to get WordPress up and running on your local machine. After setting many localhost environments, this software has become part of my regular workflow when testing WordPress plugins and themes.

I wrote a guide on how to use Desktop Server recently, which walks you through set up and installing the latest version of WordPress.

Unfortunately, you’ll need to upgrade to the premium version of the software in order to set up Multisite. The limited version of Desktop Server allows you just three WordPress installs.

WampServer

WampServer

WampServer is a popular Windows web development environment that allows you to create web applications with Apache2, PHP and MyDQL.

This is another localhost environment I’ve written about on the blog, with a guide on how to set up the software, create a MySQL database, install WordPress and (optionally) set up Multisite.

Duplicator

duplicator

The free and popular Duplicator plugin lets you clone a WordPress site for use in another location. This is especially help if you want to create an exact copy of your site to use as a testing environment on your local machine or on your hosting account.

Creating an exact duplicate of your site will allow you to test plugins, themes and even upgrades to WordPress before making changes to your live site.

Unfortunately, this plugin doesn’t support Multisite.

Instant WordPress

instant-wordpress

Instant WordPress is a complete standalone, portable WordPress development environment that turns any Windows machine into a development server. It’s so portable it will even run from a USB key.

The free software comes with its own built in Apache web server, PHP and MySQL installations that are started and stopped automatically.

Bitnami WordPres Stack

bitnami-wordpress

Bitnami offers a free WordPress stack that is self-contained and will have you up and running with WordPress in minutes. The WordPress stack is available for OS X, Linux, WordPress virtual machines and in the cloud.

The great thing about Bitnami is that the service tracks every release of WordPress and the stack is updated shortly after new releases, including security releases.

After installing Bitnami WordPress Stack, I was surprised I was able to login to my new WordPress site so quickly and wondered if I had missed any steps. It really is easy to use this software to quickly set up a test environment.

Sandbox

sandbox

The Sandbox plugin creates an exact copy of your WordPress site on your existing hosting account, providing A test environment completely independent of your site that’s hidden from visitors and search engines.

This free plugin is best for small sites as it can take a while to replicate a site. I tested the plugin in a Multisite installation and it worked fine, though it’s confusing to know when you’re using the sandbox version of your site, despite the notice at the top of the page.

Summing Up

Setting up a test environment will save you time, money and potential headaches when a plugin breaks a live site.

Duplicator is by far the most popular cloning plugin and I would recommend it for duplicating a live site on an existing web hosting account.

DesktopServer is a fantastic solution if you want to set up a local server environment on OS X or Windows. It is simple and straightforward to set up and you don’t have to worry about setting up WordPress separately as it’s part of the installation process. I regularly use DesktopServer on my Mac machine for testing plugins, themes and new versions of WordPress.

I was surprised at how easy Bitnami was to set up. While I haven’t tested it extensively, I’ll definitely be making more use of this software in future.

How have you set up your testing environment? Let us know in the comments below.

Comments (22)

  1. I use Duplicator both to pull copies of a client’s existing website for redevelopment work to my development VM, and then to push a copy of a new or redesigned website to client’s hosting — especially if I don’t have SSH access and the ability to do a git push.

  2. I did run into an issue using Duplicator and GoDaddy regular hosting. I eventually switched to their Managed WordPress but I did not try Duplicator after switching.

  3. I used to test almost everything on my WAMP server. I feel it works great but if you require to test certain features like mail etc then it becomes a difficult to use. I also tried Duplicator and found it very frustrating to use.

    I had a perfect solution to this problem when I changed my hosting to wp-engine and later to wpoven (because it’s pricing suited me better), both the hostings have the feature to make a staging site real quick. I found it saved a lot of my time this way.

      • Well I used staging at WP Engine just once but used the one at wpoven more often, but both are pretty much the same though. What I found great was the ease with which I could create a staging site (with a single click) and then I could go crazy with the plugins and thoroughly test them.
        What’s also good is that the staging site is created on the same server, so the server config for which you test is exactly the same as the one for the main site, because in the past I have faced issues a couple of times due the different configs of my local wamp and the hosted server.

  4. Is there an easy way to update a local version of a website from a live version without having to do a reinstall every time someone writes a blog post, installs a plugin etc?

  5. I’ve been planning to try DesktopServer for a while, but for now, I use WP Migrate DB to make an exact copy of my live database… the plugin takes the URL and paths for my test site and automatically replaces the live site info, then downloads an sql dump file to my computer.

    I import that into my test site, and my up-to-date test site is ready to rock-n-roll. All I have to do is manually copy over the wp-content data I want (themes, plugins, uploads), and it’s ready to go.

    • Thanks for mentioning DesktopServer in your article, Rae! We have found that DesktopServer is gaining a lot of traction thanks to articles such as yours and I’ve found that over the last few months, it’s hard for me to go to a single WordCamp without a few presenters using it or showing it in their presentations. So thanks guys, for the endorsements! And if there is anything we can do for you all, just let us know! We think the WordPress Community totally rocks!

  6. I love using WP Clone for this.

    I personally have a domain, which I only use for dev/staging sites (although you could just as easily set the dev site up on a sub domain or a sub folder). It is on the same hosting service I use to host live sites. So, I know all the server settings are the same. When I am working on a client’s site, I just create a WordPress install, and install the WP Clone plugin on the live and dev sites. It takes one click to clone a site, and one click to restore a copy. So, I can do whatever I want on the dev site, make sure everything is working properly, then copy it over to the live site.

    I have never had a problem using WP Clone for copying sites back and forth, unlike a couple of other plugins I have tried. I have not tried it with Multi-Site.

  7. I’ve tested most of these solutions out at one time or another but there are still a few I am yet to try so thanks for the list. Recently I’ve had great success using the Duplicator plugin and I’d definitely recommend it.

Participate