If you’ve ever hit “Update” in your WordPress dashboard and watched as your entire site is sucked down into the dark abyss of the White Screen of Death, you already know why you need a WordPress test site. For those of you living on the edge and updating your live website without testing, it’s only a matter of time. The WSoD will find you. It’s there. Waiting. For you.
Maybe that’s a little melodramatic (it is), but seriously. You’re making changes all the time to your WordPress website, and it’s just good common sense to test those changes first before you eventually wind up breaking something. Let’s look at why this is a good idea (beyond just not breaking something), and how to do it!
Why Do I Need a WordPress Test Site?
There are a number of specific reasons a test site is a good idea, and I’ll list a few of them below. In the simplest possible terms though, it reduces the risk of your website failing. For anyone with a website, especially those of you whose income depends on your site, that’s a very basic but critical factor in your online success. Depending on your technical level and support resources, an error that brings down your site could take quite a while to resolve. A test site is the ultimate preventative to many basic errors.
Let’s look at some specifics.
You don’t break your live site when you make changes. This is the most obvious and also the most important. Anytime WordPress updates, your theme updates, a plugin updates, you install a new plugin, you make any change whatsoever, do it on your test site first. If/when something goes wrong, your test site takes the hit instead of your live site.
Redirect traffic to your test site when something goes wrong. Very useful if you have a test site that is set up with a hosting service on its own domain. You have the ability to redirect traffic from your main site to your test site as a temporary measure in case something does happen to bring down your main site. Ideally your test site should be a fully functional mirror image of your live environment.
Use it to learn the inner workings of WordPress without fear. Do I really need this .htaccess file or is it just taking up space? Hey this file looks blank, I don’t need this! Etc, etc. For those of us whose familiarity with WordPress isn’t 100%, there’s no better way to learn what makes it tick than to just get under the hood and see. That’s a terrible idea on your live production site, but with a test site you can tinker to your heart’s content.
Use it to practice code. You might not have your sights set on learning development, but the basics of HTML and CSS are extraordinarily handy to learn for truly getting the most out of your site. How many times have you wished you could style that submit button? Dive in and learn! You don’t have that luxury unless you have a test site set up because you can most definitely break something this way. That’s a nonstarter on your live site, but not on your WordPress test site!
Use it to experiment with alternate ideas, themes, and plugins. You know you’ve wondered before if this theme could work with your site, plugin A could do x better than that Plugin B, etc. A test site gives you the flexibility to experiment at will and without fear.
3 Ways to Set Up a WordPress Test Site
Be aware that if you are with a managed WordPress host, they probably provide a test site/staging site as part of their service. Check with your managed WordPress host first if that’s the case.
1) Set Up a Local Installation
Tools like MAMP are perfect for setting up a local WordPress installation. MAMP turns your personal computer or Mac into a local server to which you can import a clone of your website to work on at your discretion. It’s not difficult to do and you have very easy access to make changes- no FTP needed. We even have step by step instructions on how to do it. The downside is if something does go wrong with your live site at some point, you can’t redirect traffic to your local machine.
2) Set Up a Subdomain
A subdomain is basically a branch off of your main domain with the same host. You’d wind up with a URL like https://testsite.mywebsite.com. This method keeps both sites in one place. That’s a plus for convenience, but if your main site does go down your subdomain site is probably going with it, so you don’t have the benefit of a backup site to roll to. You’d also need to be very careful when modifying your test site that you’re not in the live site’s folders by accident. It’s relatively easy to set up however, and most hosts provide clear instruction such as this example walk-through via Inmotion Hosting
3) Set Up an Entirely New Domain
This option will require you picking up a secondary domain, maybe the .org equivalent of your .com site for instance, and hosting a clone of your live site at that address. This will be an added expense with the need to purchase a second domain and hosting. If your income depends on your website, it’s potentially money well spent however. With a domain all of its own, your test site can now serve as your failsafe, a working clone of your site to redirect traffic to in the event that your live site goes down.
Tools that Make Life Easier
The more exact a copy your test site is of live, the more effective it’s going to be in helping you discover issues with updates etc. It stands to reason then that that should be your goal. If only things were as simple as copy and pasting folders! Unfortunately that’s not the case if you want a full working clone of your live site. Fortunately, there are tools that make it almost that easy! Let’s look at a few.
This is a really neat service that lets you live host a staging site. It takes the pressure off you to get everything duplicated properly, as duplicating your live site in their environment is part and parcel of their service. From there you can play around in your staging set up and if you like what you see, one-click merge the changes to your live site. Told you it was cool! Only downside is that it obviously comes with a price tag, but depending on your budget it’s not that bad.
Duplicator, WP Staging, All-in-One WP Migration, et al.
These WordPress plugins (and others like them) make duplicating your live site into your WordPress test site a breeze. They are definitely not clones of one another, but they all serve the same fundamental purpose. Each has their own unique features, so check them out in turn and find the one that best suits your needs.
So now you 1) know why you need a test site 2) know how test sites can be set up, and 3) have some tools to hep you do it. I’d love to hear your experience getting your WordPress test site going. What problems did you have along the way? What tools did you find particularly useful? Did you go about it a different way or have unique experiences to share? Let us know!