Do you want to create a staging site for WordPress but are not sure where to start?
A WordPress staging site is a test site that you can use to “safely” make plugin updates and other changes before going live.
In this step-by-step guide, we’ll show you how to easily create a staging environment for your WordPress site. We will cover several different methods and most of them only require a few clicks.
What is a Staging Site?
A staging site is a clone of your live website that is used for testing changes before making them live. Staging sites help you catch errors, so you don’t end up breaking your live website.
In the past, it used to be very difficult to set up a WordPress staging site, but now that has changed so even a non-technical person can do it.
The biggest problem with this approach is what if something that worked on your localhost does not work on the live server?
Often the local sites and live WordPress hosting servers are not running in the same environment.
Since the staging site lives on your web hosting server, you can easily prevent all those errors because it runs the same server configuration as your live site.
With that said, let’s take a look at how to set up a staging site for WordPress.
How to Easily Create a WordPress Staging Site
There are multiple ways to create a staging site for WordPress. The easiest of them is to use your hosting provider’s built-in staging site feature.
Some of the best WordPress hosting companies already offer 1-click staging websites. If your website is hosted with one of them, then you can easily create a staging site without any hassle.
If you’re not with one of these popular hosting solutions, then we also have a solution to help you create a WordPress staging site using a plugin (and even manually).
For faster browsing, you can use the navigation below to jump to the section that’s most applicable to you.
Creating A Staging Site on Bluehost
Bluehost is one of the best WordPress hosting companies. They offer a quick 1-click staging site solution that comes with all their plans.
First, you need to log in to your WordPress site’s admin area and go to Bluehost » Staging page.
This will bring you to Bluehost’s staging site wizard. Next, you need to click on the ‘Create Staging Site’ button to continue.
Bluehost will now prepare the staging environment for your website. Once finished, you will see a success message and an option to switch between the production and staging sites.
Simply click on the radio button next to the Staging site and Bluehost will switch to your staging website.
Once switched, you will see a button on top of the screen indicating that you are working on the staging website.
You can go ahead and work on your website without worrying about it affecting your live site.
Deploying changes from staging to live site on Bluehost
Once you are ready to push changes from staging to the live site, simply go to Bluehost » Staging page.
From here, you’ll see the deployment options drop-down menu next to your staging website. You can deploy only the files, only the database, or deploy all changes.
If you’re not sure, then click on the ‘Deploy All Changes’ button to continue.
This will bring up a popup where you will be asked to confirm that you want to deploy the staging site to the production site. Click on ‘Deploy’ button to continue.
Bluehost will now start deploying your staging site to the live site. Depending on the size of your website, this may take a while.
The pop-up will automatically disappear when deployment is over and you’ll see a success message.
You can now switch back to your live website to see your changes in action by clicking on the Radio button next to the Production site URL.
Cloning Production Site to Staging
Now, as you switch back to the production website any changes you make there are not automatically synced to your staging website.
In the future, if you want to test more things on your staging website you’ll need to duplicate your site.
Simply go to the Bluehost » Staging page and click on the ‘Clone to staging’ button.
Bluehost will then clone the latest changes to your live website to your staging website. After that, you can switch to the staging website for testing and development.
Creating a Staging Site on SiteGround
SiteGround is another top WordPress hosting company offering a 1-click staging feature with their GrowBig and GoGeek plans.
If your website is hosted with SiteGround, then this is how you would set up a staging website.
First, you need to log in to your SiteGround dashboard and switch to the Websites tab. From here you need to choose the Site Tools below your website.
On the next screen, you need to click on WordPress » Staging menu from the left column.
From here, you need to select your website and then provide a name for your staging copy.
Click on the ‘Create’ button to continue and Siteground will create a staging copy of your website.
After that, you need to click on the ‘Go to protected URLs’ button so that you can password-protect your staging website and keep it private.
On the next screen, Siteground will automatically fill in the URL and path for your staging website.
You need to enter the username and password that you want to use to protect your staging site.
Click on the Protect button to save your settings.
You can now go back to WordPress » Staging page and click on the login to Admin Panel button next to your staging website.
SiteGround will now open the WordPress admin area of your staging website. You can test your changes on this staging website.
Deploy Changes Back to Your Live Website
Once you have tried your changes on the staging website, you may want to merge them to your live website.
SiteGround makes this easy too.
Simply click on WordPress » Staging menu from the left column. Then click on the three-dot menu next to your staging site under the ‘Manage Staging Copies’ section.
The menu will show you two deployment options. You can either choose ‘Full Deploy’ or ‘Custom Deploy’ option.
The ‘Full Deploy’ option merges everything from staging website to your live website. ‘Custom deploy’ allows you to select which files or data you want to merge.
If you are unsure, then choose ‘Full Deploy’ option.
SiteGround will then copy the staging site to your live website.
Merging Live to Your Staging Website
Changes you make to your live website are not automatically copied to your staging website, though.
Each time you need to work on your staging website, repeat the process above to create a fresh staging website.
Creating a Staging Site on WP Engine
WP Engine is the best WordPress managed hosting company in the world. Managed WordPress hosting is a concierge service for your WordPress site where the hosting provider takes care of updates, backups, security, and performance.
WP Engine offers a one-click staging solution with all their plans. If you are using WP Engine to host your website, then this is how you would set up a staging environment for your site.
First, you need to log in to your WP Engine dashboard. Next, go to the ‘Sites’ page and select your website by clicking on it.
This will bring you to your website dashboard.
Now, you need to click on the ‘Add Staging’ link from the left column or select it under your site name at the top.
This will bring you to the ‘Add Environment’ screen.
You’ll be asked to choose how you wish to proceed with your staging environment.
Here is what each of these options does:
- ‘Start with a new blank site’ creates a new empty site.
- ‘Start with a guided experience’ creates a new site with a guided experience and demo content.
- ‘Copy an existing environment to this site’ will copy your production or development environment to this site (e.g. copy your live site to this environment).
- ‘Move an existing environment’ moves an environment to this site (e.g. move the development environment to the Staging)
- ‘Start with a WooCommerce site’ creates a new WordPress site with WooCommerce pre-installed.
Since you want to create a staging copy of our live website, you’ll need to click on the ‘Copy an existing environment to this site’ option.
After choosing an environment choose the latest backup you want to copy from and then click on the ‘Next’ button to continue.
Now, you’ll need to provide a name for your staging site. This name will be used in your staging site URL. After that, choose STG (staging) as your environment type.
Click on the ‘Create Environment’ button to continue.
WP Engine will now create a staging site for you. After that, you will be redirected to your Staging environment dashboard.
Next, you need to click on the Padlock button to enable password protection for your staging site.
After that, you need to switch to the ‘Utilities’ tab to copy your staging site username and password.
You can now click on the ‘WP Admin’ button at the top to log in to your staging website.
Feel free to make changes and try out features on the staging website just as you would in a typical WordPress site you install anywhere else.
Deploy Changes From Staging to Live Website on WP Engine
Want to merge changes you made on the staging website to your live website?
Simply click on the ‘Copy Environment’ button to begin deployment.
This will bring you to the options page. From here, you need to choose your source and destination environments for the copy.
Here you’ll select your staging website as the source environment and your production or live website as the destination environment.
You can choose what you want to copy. For instance, you can copy all database tables and files, specific files and database tables, or only the file system.
Note: If you choose to copy everything then you will lose any data stored on your live website after you used it to make the staging environment. This may include important data such as new posts, pages, customers, and orders. So it’s a good idea to run a backup of your live site before deploying from staging.
Next, click on the ‘Review and Confirm’ button to begin deployment. It will take a while to copy everything to your live website.
You will get an email notification when the process is complete.
Creating A Staging Site using WordPress Plugin
If your WordPress hosting company does not provide a staging site feature, then you can still create a staging website using a WordPress plugin.
There are some disadvantages to using this method.
First, a plugin would have limited control over your hosting server. This is why it may not always give the best results.
Secondly, the plugin we will be using will store your staging site on its own servers. If you are concerned about privacy and data protection, then this may not be the ideal situation for you.
Lastly, the plugin has several known incompatibilities. Please check their incompatibilities page to make sure that your website is compatible.
That being said, let’s see how to create a staging WordPress site using a WordPress plugin.
Upon activation, the plugin will add a new menu item labeled WP Stagecoach to your admin bar. Clicking on it will take you to the plugin’s settings page.
You will need to enter your WP Stagecoach username and the API key which you can find under your account on the plugin website.
After that, you need to visit the WP Stagecoach » WP Stagecoach page and choose a name for your staging site. This name will also be used as the subdomain of your WordPress staging website.
Don’t forget to check the box next to the ‘Password protect the staging site’ option. It will protect your staging website from public view and search engines.
Click on the ‘Ride the Stagecoach’ button to continue.
The plugin will now create a backup of your WordPress files and database to export them for your staging site.
It may take a while depending on the size of your WordPress website.
Once finished, you will see the link to your staging site and its admin area.
You can click the link to visit your staging site and start working on it.
You’ll notice a bright orange message in the admin bar at the top indicating that you are working on your staging site.
Deploying Staging Site to Live Using WP Stagecoach
Once you are ready to import changes to your live site, head over to the WP Stagecoach » Import Changes page and click on the check for changes button.
The plugin will now check for changes on your staging site and then show you options to import them.
You can choose from all changes, file changes, or database changes.
The plugin will show you the progress of the import and will notify you when it is done.
You can now test your live site to see if all changes were successfully imported.
Create a Staging Site for WordPress Manually
This method will teach you to manually create a staging site for your WordPress install. It is for advanced users and requires more work than other methods described above.
Another disadvantage of this method is that your website will be temporarily unavailable when deploying changes back from staging to the live server.
That being said, let’s see how to manually create a staging environment for your WordPress site.
First, you need to create a subdomain for your staging website. Go to your hosting account’s dashboard and click on the ‘Subdomains’ link located under the domains section.
Note: We’re using Bluehost in our example screenshot, so your screen may look different.
Provide a name for your subdomain (such as staging.example.com), and then click on the create button.
Your hosting control panel will now add your subdomain, which you can use to import your live WordPress site.
Next, you need to install and activate the Duplicator plugin on your live site.
Upon activation, you need to click on the Duplicator menu in your WordPress admin sidebar and click on the ‘Create New’ button under Packages.
After that, you will be asked to click on the ‘Next’ button to continue. Duplicator will now run the website duplicator wizard.
First, it will run some tests to see if everything is in order. If all items are marked ‘Good,’ then click on the ‘Build’ button.
The plugin will now start creating a Duplicator package for your WordPress site. This process may take a few minutes depending on the size of your website.
Once finished, you’ll see download options for Installer and the Archive package. You need to click on the ‘Download Both Files’ button to download both files on your computer.
You’ll need to upload both of these files to the file directory of the subdomain you just created. For details, see our guide on how to use FTP to upload files to your WordPress website.
Next, your new staging WordPress site will need a new database. Let’s create one.
Head over to your WordPress hosting account’s control panel and click on ‘MySQL Databases’ icon located under the ‘Databases’ section.
If you are not using Bluehost, then your WordPress hosting environment may look a bit different. Don’t worry and just look for the Databases section.
On the next screen, provide a name for your database and then click on the create database button.
Next, you need to create a MySQL user for your database.
Scroll down to the MySQL Users section and provide a username and password for your new database user.
Now you need to give this user permission to access and modify the database you created earlier.
Simply scroll down to the ‘Add user to database’ section and select your database and the user you just created.
After that, click on the ‘Add’ button to continue.
You will be asked to select privileges for the user. Go ahead and select ‘All Privileges’ checkbox and then click on the ‘Make changes’ button.
Now your database is ready to be used for your staging website.
Next, you need to open a new browser tab and visit enter the subdomain of your staging site like this:
Don’t forget to replace
yoursubdomain with the actual subdomain and
example.com with your own domain name.
This will launch the Duplicator installer wizard.
Under the ‘Setup’ section, the installer will ask you to enter your WordPress database information.
Your host will likely be localhost. After that, you will enter the details of the database you created for your new domain name in the earlier step.
Click on the ‘Validate’ button to make sure that Duplicator can connect to your database.
Once done, click on the ‘Next’ button to continue.
Duplicator will now unpack your WordPress database and files and import them to your staging site.
Once finished, you will see a success message.
You can click on the ‘Admin Login’ button to enter the WordPress admin area of your website on the new staging site.
Now you have your staging site set up. You can protect it by adding password protection to the subdomain.
Head over to your hosting account’s cPanel dashboard and click on the ‘Directory Privacy’ icon.
Next, you need to select your subdomain folder and then select the option to ‘password protect this directory’ checkbox.
You will be asked to provide a name for this setting, and then enter a username and password.
Click on the save button to store your settings. Your staging site will now be hidden behind password protection, keeping it out of search engines’ hands and the public’s eyes.
You can now work on your staging site and make any changes you want.
Manually Deploy Staging Site to Live
After you are ready to deploy changes from your staging site to the live server, you will follow the same steps described above.
Simply create a new Duplicator package on your staging site and download the Installer and Archive files to your computer (See instructions above).
Next, you need to head over to your live site and create a complete WordPress backup (you can use Duplicator to create a complete backup as well).
Once you are done, you will need to delete all WordPress files and folders from your live website. This means your WordPress site will be down for a while.
Finally, follow the instructions above to run the Duplicator installer wizard to import the staging site to the live server.
As you can see, the last method is not the best method at all. There are many ways during the process that you can damage your site.
We suggest avoiding this method at all costs unless you have no other choice. We recommend using a reliable hosting provider like Bluehost, SiteGround, or WP Engine that offers built-in staging site features.
We hope this article helped you learn how to easily create a staging environment for your WordPress site. If you run into any issues, check out our ultimate guide to fixing the most common WordPress errors.