One of the most important aspects of running a WordPress website is maintenance. By performing website updates regularly you can ensure your website is secure and runs efficiently.
Website updates refers to any changes you make to WordPress or your activated WordPress theme. This includes updating to the latest version of WordPress, updating WordPress themes and plugins, and adjustments to your website design.
It is good practice to backup WordPress before you perform any major change to your website such as updating WordPress to the latest version or modifying a theme template. Most of us, however, are guilty of making quick changes to a live website to save time. Unfortunately, this can be risky.
When you update a WordPress plugin, there is always a chance that the update could crash your website. Even a minor change to a WordPress widget can cause significant problems at the front end of your website if you have not entered code correctly.
This is why experienced WordPress website owners use a WordPress staging environment. A staging environment reduces the risk of fsomething breaking on your live website.
In this article, I would like to explain the benefits of website staging and show you how you can set up a WordPress staging site for your website.
The Benefit of Website Staging
A staging environment is a test area which has an exact copy of your WordPress website.
Using this test website you can safely perform updates without worrying about anything going wrong as the test website is not displayed publicly. If the test website was to crash, you simply need to reset it and make it a clone of your live website once again.
This setup will allow you to perform code modifications, plugin updates, and other changes, without the risk of your live website going down. Once you are happy with the changes you have made, the test website can be copied over and replace your live website.
Most people refer to the test website as the staging site.
Setting up a staging site for your website is highly beneficial. If you actively use it for all website updates, you can effectively eliminate the chance of your live website going offline due to an update or modification.
Create a Staging Environment with Your Host
Over the last five years we have seen managed WordPress hosting companies become more popular. Managed WordPress hosting services specialise in hosting WordPress websites and offer a simplified hosting environment, expert WordPress support, daily backups, and performance features such as caching.
Website staging is frequently integrated into the main hosting control panel in managed WordPress hosting plans. It is offered by managed hosting companies such as Kinsta and WP Engine and in the WordPress plans from more affordable hosting companies such as Bluehost and SiteGround.
Generally speaking, setting up a staging site through your hosting company is one of the most user-friendly ways of utilising website staging. New staging areas can be created, deployed to your live website, and deleted afterwards, at the click of a button.
Check out Brian Jackson’s tutorial about setting up a staging environment in Kinsta to see how the whole process works.
BlogVault is a premium backup and security service that recently featured in my article about backing up WordPress. I have been using BlogVault to backup my blog for a year and Charlie Livingston, the founder of aThemes, uses the service too.
One of the most interesting aspects of BlogVault is that in addition to providing daily backups and security scans, it also offers website staging.
Creating a new staging environment is straightforward. All you have to do is select a backup of your website that you want to deploy as a staging site and the PHP version you want used in the test environment.
BlogVault provides you with sFTP and phpMyAdmin login information for your staging site so that you can access it directly. They also ensure the staging site is hidden from search engines.
If your hosting company offers website staging, I highly recommend using it for website updates as it is a user-friendly staging solution.
You should be aware, however, that many hosting companies do not offer website staging and those that do sometimes charge extra for the feature or restrict website staging to higher priced plans. Additionally, many managed WordPress hosting companies limit customers to one staging site.
Thankfully, it is not too difficult to set up a staging environment yourself.
How to Create a Staging Environment with WP Staging
WP Staging is a WordPress plugin that simplifies the process of creating and managing your own staging environment.
Once you activate the plugin you will be advised to back up your WordPress website, using a solution such as BackWPup, before creating your first staging site.
New staging environments can be created in three steps.
In step one, all you have to do is click to “Create New Staging Site”.
In the second step you can configure your staging site.
This section is divided into three categories: Database tables, files, and advanced settings.
All database tables are selected by default, however you have the option of excluding tables from being copied over to your staging site.
The plugin also allows you to select which WordPress directories are copied over to your staging environment.
Additional directories can also be migrated.
WP Staging is free to use, however if you upgrade to the pro version you will unlock additional features such as cloning to a different database or domain. Both of these features are visible in the free version, but are restricted.
A single license for WP Staging Pro retails from €89 and comes with one year of support and updates.
Once you have stated what database tables and files to copy over, you should check the required disk space using the link at the bottom. This will vary from website to website. For my test WordPress website, the plugin estimated that 2GB was required.
You can then begin the cloning process.
The time it takes to create a clone of your website in a staging area will depend on the size of your website. For reference, it took three minutes and 40 seconds to create the clone of my test WordPress website.
Once your website has been cloned, WP Staging provides you with a direct link to your new staging site.
Underneath you will find notes about your staging site such as search engine friendly permalinks being disabled.
One of the things I love about WP Staging is that it changes the colour of the WordPress admin bar to remind you that you are viewing your staging site, not your live site.
A reminder that you are viewing your staging site is also displayed in the WP Staging plugin page.
WP Staging is a fantastic staging solution for WordPress users. The process of cloning your website is quick and simple and there is a general settings area that lets you adjust transfer settings for your database and files. These settings can also be imported and exported.
The plugin allows you to create as many staging sites as you wish and from the main overview page you can delete staging sites and overwrite them with the current version of your website.
I believe the free version will be sufficient for many WordPress users, however you can upgrade to the pro version if you need to copy your website to different databases and domains.
How to Create a Staging Environment with WP Stagecoach
WP Stagecoach is a premium WordPress staging solution that stores the staging site on their server, not yours.
This may be preferable to many website owners as a solution such as WP Staging reduces the available storage in your hosting plan as it installs the staging area on your main domain.
WP Stagecoach is a straightforward solution that can set up a staging area for you in minutes.
Once you have activated the plugin, you need to enter your WP Stagecoach username and API key in the settings area. This is provided to you once you have signed up to the service.
The settings page also has some other useful settings. This includes an option to remove data upon deactivation, additional settings if you are having trouble creating a staging site, a debug menu, and an option that supports websites that are hosted on slow servers.
Creating a staging site is a breeze.
All you have to do is enter the name of your staging site. This will be used to set up a staging area at WPStagecoach.com.
At this point you can also select to disable caching in the staging area. The staging site can be password protected too.
Interestingly, WP Stagecoach knew not to copy over the other staging areas I had previously created on my test website. It also knew not to copy over backups I had recently created for my article “13 Ways to Backup WordPress” as it determined the files were too large.
If you wish, you can still copy over large files to your staging site.
After a few minutes, your staging site will be ready. You can login to your staging site using the same username and password you use on your live website.
WP Stagecoach also provides SFTP login information so that you can manage files using an application such as FileZilla.
A message is displayed at the top of your staging site to remind you that you are not viewing your live website.
You will also find a link to phpMyAdmin on the WP Stagecoach page in your staging area. This is useful if you need to make changes to your WordPress database.
WP Stagecoach is available from $120 per year. This allows you to use the service on 10 domains.
The yearly freelancer plan works out at effective monthly rate of $10 per month; however there is an option to pay on a monthly basis at $12 per month.
All plans allow you to test the service for two days before you were billed. I would prefer they offered a longer trial period, however this should be a sufficient amount of time for you to test how everything works.
I was thoroughly impressed by WP Stagecoach.
The company have did a great job of keeping the process of creating a staging site simple and it has some great features such as password protection and the ability to exclude large files from being copied over to the staging site.
How to Manually Create a Staging Environment
WordPress plugins such as WP Staging and WP Stagecoach have simplified the process of creating your own staging site.
You may, however, want to create a staging environment manually instead.
Creating a staging environment manually takes a little more time, however there are legitimate reasons why many WordPress users choose to do it this way. For example, a local staging site is more secure as it cannot be accessed online.
Despite the setup process being slightly different, the purpose of setting up a staging site manually remains the same i.e. to create a copy of your live website so that you can perform updates safely.
There are a number of places you can manually store a staging site.
- A sub-directory of your live website
- A subdomain of your live website
- A test server from a cloud service such as Vultr
- A local installation of WordPress on your computer using a development environment such as XAMPP
In order to make a clone of your live website for your staging site, you need to copy over all WordPress files and copy your website’s database.
- Download all files from your live website using an FTP client such as FileZilla
- Export the database of your live website using phpMyAdmin (or other database management application)
Now that you have backed everything up, you can create your new staging area.
This process is easy to follow, however you should refer to WordPress’s official migration guide if you are unsure.
- Create a new database and database user with admin privileges for your new domain, subdomain, or local environment
- Edit the wp-config.php file to reflect the new server’s URL and database information
- Upload all files to the new server using FTP
- Import your WordPress database
Cloning a WordPress website using the method above is not difficult if you follow all steps correctly, however it can be time-consuming. Thankfully, there are a number of WordPress plugins available that simplify this whole process.
WP Migrate DB and All-in-One WP Migration can be used to migrate and clone websites, however the solution that we recommend is Duplicator.
Duplicator can be used to clone a live WordPress website to a staging area or vice versa. It allows you to select which files and database tables are included in the backup of your website. You can, for example, only back up your WordPress database.
Your new server’s database information can be entered in the installer section during the configuration part of the setup.
Duplicator could be a little more user-friendly, however once you understand how the plugin works, you will appreciate how useful it can be.
Without doubt, creating a staging environment through your hosting plan, or using a WordPress plugin such as WP Staging or WP Stagecoach, is a simpler way of creating a staging site.
Many WordPress users, such as developers, instead choose to create staging sites manually as it gives them more control over their staging environment.
I hope you have a better understanding of the benefits of website staging and how you can use staging sites to perform safe website updates. I believe more WordPress users should take advantage of website staging as it eliminates the chance of a WordPress core update or plugin update from crashing your live website.
Whilst I know how to set up a staging site manually, I personally prefer more user-friendly website staging solutions as they are easier to set up and maintain. Additionally, it saves me time.
Whatever method you use to create a staging site for your live website, I hope you have found this tutorial useful.