Have you ever visited a website and noticed that there was something a little “off” about how it looked or something was broken and wasn't working as expected? On the flip side, have you ever been updating your own website and realised that while you're working on changing something, anyone visiting the site is going to see you “work in progress”, so you end up making changes at odd times of the day to try and avoid that?
Alternatively, how about visiting one of you favourite sites one day and then returning the next to find that it has gone through a complete redesign, and you were non the wiser (it almost seemed like it happened overnight)?
Well, in each of these cases, a staging site could have helped to avoid the issues we described and allowed the “new design” scenario to take place, all without the end user noticing anything was happening out of the ordinary. And these are just some of the reasons why having a staging site is “good practise” when it comes to maintaining your website (whether it's a WordPress site or not… although in this article we'll concentrate on WordPress).
What is a WordPress staging site?
Ideally, a staging site is an exact replica of your live website, hosted on an identical server configuration, used for the purposes of testing updates and developing new features. Everything about the site is identical to your live site, it's just not available for anyone to visit and see what you are doing.
When you're working on the staging site, the changes you are making will have no affect on your live website, meaning that you can experiment and change things without it having any impact on your live site or the experience of your customers. Should something break, then it doesn't cause any downtime and you can restore your site from a backup and start again.
How do staging sites work?
Generally, a staging site will be created as a subdomain of your live website, so something like staging.yourdomainname.com. The site itself would live in a completely separate folder on your hosting server (or potentially even a completely different, but identical, server) and it would also have it's own database with a copy of your existing data in it.
If you were adding a new plugin or performing updates to your WordPress install, theme or plugins, you would do this on your staging site first, check that everything continues to behave as it should and then copy or push those changes across to your live website once you knew that the changes didn't cause any issues.
The new files and content would then replace the old live site, overwriting any of the old files and configuration that you used to have, effectively bringing the live site up to date with the staging site. Sometimes this process would be performed manually, whereas in many cases this can be automated through a “push” process that copies everything from the staging site to the live site (and vice versa in some cases).
How does the “push” process work?
There are essentially a couple of variations for pushing your site from one place to another, staging to live for example:
- Full Push. in this case you take everything on your staging site and push it to the live site in it's entirety, your whole live site is replaced with the contents of the staging site, warts and all, if you will.
- Partial/Advanced Push. This involves choosing which elements from your staging site you want to push to your live site, whether it's just the updated files or parts of the database, you can control what changes.
Depending on the type of site that you have and the changes that have been made, will determine what sort of push you will do when your staging site is ready to be made live. If you want to retain content on the live site then maybe you'll just elect to push across the updated files from the staging site to ensure any new posts are not overwritten, the same goes for order data that may only exist on the live site.
In some cases, you may choose to push a copy of your live site to your staging server before you elect to do any development, especially if the changes you're making will be relatively small (like plugin updates). This way, the staging site exactly matches the live site before the development is done and if no changes have occurred on the live site in the meantime, you can just do a full “push” back to the live site when you are finished with your updates.
Why would I want a staging site?
There are a number of scenarios where having a staging site makes sense and in reality having one would be considered best practice when it comes to developing websites with WordPress (as it receives regular updates). Here are a few examples:
1) Updating WordPress, Themes and Plugins
Like all software, WordPress and the themes and plugins that make it so successful are regularly updated to ensure that they are free from bugs or security risks, as well as adding new features or functionality for the end user. Sometimes these updates are major and can result in conflicts with other parts of the site and cause things to break and the last thing you want is for this to impact your site visitors experience or worst case, put your site offline at a critical time.
2) Adding new features or functionality
Most websites grow and changes over their lifetime, adding new features or functionality to provide an improved experience for the end user. While you are developing or adding these things, you don't want visitors to the site experiencing any side effects or your work or stumble across parts of the site that aren't ready for public consumption. This is a great time to make use of a staging site, as you can work in the knowledge that no one will see what you're doing until you are ready for them to.
3) A redesign or rebrand
Things changes over time. Your business might decide to undergo a rebrand and you want to launch a new website alongside it to reflect these changes and provide your visitors with a new look and feel. Maybe design trends have moved on since your website went live and it's time to bring it up to date and/or take advantage of the latest technology. All of these things can require significant effort and you don't want people visiting your site while it's in a state of “change”, so your staging site will allow you to tinker away to your hearts content, and then release the update to everyone when you're ready.
When is a staging site, not a staging site?
The great thing about WordPress is there is usually a plugin to the job or provide the functionality that you need, however in many cases in order to get the most out of them, you'll need to pay for the “premium” version as the free one will have limited functionality and that is where you might find yourself with a staging site that isn't as safe as you might think.
For one thing, relying on a plugin to provide staging functionality from within WordPress doesn't protect if that plugin is the one that causes you problems. Unfortunately this is a possibility, and if it is the case that the staging plugin is the one that breaks your website, then you're going to need another alternative to get you back up and running.
In addition, in some instances, the staging plugin will create a duplicate of your website “inside” your existing file structure and make use of the same database, which again leaves you somewhat exposed should you be developing on your staging site and it manage to corrupt the entire database, leaving your live site to suffer the same consequences.
While many of the “plugin” based staging solutions work well, they do come with risks that are not going to be associated with a more advanced staging solution, however don't discount them entirely, especially if you're prepared to invest in the paid versions as many of these will allow you to set up a staging site using a completely different database and even on a separate server, which will give you a much more robust solution in the long run.
So what could happen if you don't use a staging site at all?
On the one hand, it's possible that you'll see no affects whatsoever, especially if you have a small, simple website, WordPress, theme and plugin updates tend to run pretty smoothly, so there's definitely a chance you'll be all good.
On the other hand, it just takes one small problem to completely derail your website, leaving your visitors angry that they can't get to your site to do what they want, and you frustrated with having to figure out how to restore a backup or paying a small fortune for your developer to do it on a rush basis.
Worst case scenario, your website could be down for a number of hours and if you're running an ecommerce site this could run into the thousands in lost revenue. Alternatively, it might just be a small issue that plagues your site but leaves your visitors with a bad taste in their mouth, leading them to believe that you're not “professional”, instead deciding to use one of your competitors.
Even a “professional” WordPress developer will prefer to (and advise) that they make changes and test updates on a non-live version of your site in order to ensure that there is no disruption and it is considered best practice when it comes to web development of any kind to test your changes before putting them live (and it's not just a WordPress issue).
So, you really should make use of the technology available to create a staging site for your WordPress website, it'll make your life easier in the long run.
We offer staging on all of our hosting plans!
Rest assured, if you build your site with us and choose to make use of our hosting, then a staging site is part of this service, allowing you (and us) to make changes to your site in a low risk environment. It's a no-cost inclusion in our hosting offer, meaning you can be confident that your live site will be up and running smoothly, no matter what state your staging site is in.
And of course, whether you choose to host with us or not, we can always work with you to ensure that your existing hosting provider is able to offer you a suitable staging solution. Most of the premium WordPress hosting providers include this as part of there service, while there are solutions (as mentioned above) that can be taken advantage of if it's not a built in function.
We highly recommend using staging sites for your WordPress builds, so reach out to us if you'd like some help making it happen for your website (or if you've just got a question… we're here to help).