If you have spent any time running a WordPress website, you know what this means:

Especially for an eCommerce site, this number can strike fear into your soul!  Sure, you can put off updating your site for a while, a very long while in fact, but there will come a time when a critical update will be pushed out, and you really have no choice.

So what do you do?

From the time I’ve spent on assorted forums, facebook pages, and handling the support for TPP, there is a large section of people I’ll call the YOLO’ers (slang for you only live once – if you don’t know what that is, you’re probably over the age of 35).  These are the people that will smash the “Update All” button and not think twice.  What happens next, as many have found out, is a site that ceases to function.  In a perfect world, everyone’s plugin would play nice with everyone’s theme, and they would all play nice with WordPress.  The reality though, that is seldom the case, and if you run untested updates on a live site, it is only a matter of time before you are scrambling to restore your last backup, because something breaks in a major way.

That’s all well and good, but how do I test an update?  I’m not a developer!

Staging sites, that is your answer.  Many hosts these days will even provide you with a “testing,” “development,” or “staging” site as part of being a customer of theirs.  If not, they are very easy to setup!

What is a staging site?

The easiest way to think of a staging site is to consider it an exact copy of your “live” site.  The same plugins, the same files, the same database structure and the same modifications.  The only thing you may not bring over will be your content.  It’s not necessary for all 1,000 of your products to be copied, along with the 5,000 images.  Nor do you need all 200 blog posts.  What you will need is a few sample products, as well as some sample blog posts (if you run a blog).  The idea is to have a site that will function exactly as your primary site does, within putting a large drain on your server.

Do I need a separate domain name?

The short answer is no, but you will need a sub-domain at the very least.   If you are not familiar with subdomains, and how that works, you should be able to ask the company you registered your domain with, and they can help you out!

So how does it all work?

Very basically, your website is running on two independent installations of WordPress.  One for your “live” site, and another for your “staging” site.  That way, any changes you want to make, you can first try them on your staging site.  It gives you an environment to take your time testing, and making sure everything works.  So, when the inevitable happens, and an update blows everything up, it’s not blowing up your primary site.  Killing a staging site is a minor inconvenience.  Killing your primary site is a nightmare, and many times will cost you at least one late night of trouble shooting.

My host doesn’t offer staging sites, how do I actually do it?

There are a bunch of different ways to setup a staging site.  This will be the least technical way, which should get you really close to an exact copy.

  • Create your subdomain.  Many will use staging.mydomin.com or dev.mydomain.com, but you can use anything you want.
  • Install a fresh copy of WordPress on the domain.  If your host doesn’t provide for “1 click” installs, this is a good article.
  • Make sure search engines can’t see your site.  You don’t want Google or others to show this site in search results.  WP allows you to discourage search engines from viewing the site, but if you want to ensure they can’t see it, you can always set the entire site behind a password.
  • Install your theme/child theme and any plugins you are using on your “live” site.
  • If you have any custom code, update the theme/plugin files with the custom code.
  • Update all the assorted theme and plugin settings.
  • That’s pretty much it!  You now have a safe place for testing!

Even with a staging site, backups are crucial before making any major changes.  Restoring sites is never fun, but restoring a backup from a few minutes ago is much easier to swallow than restoring one from 3 month ago.

If you don’t already have some type of testing environment setup for your site, then I hope that is your next project.  The minor inconvenience of setting them up will pay dividends when you run into a conflicting update.

Leave a Reply

Your email address will not be published. Required fields are marked *