Creating a WordPress staging website is an excellent idea for testing changes without affecting the live website.
If you are an agency or an individual developer, a WordPress staging environment is a great way to accelerate the development workflow and to deliver mockups to your clients before the deadlines. Once everything’s in place and clients approve the designs, you can push everything to live a website with a click of a button.
Now that you’re convinced that you want to develop your site on a staging environment, let’s dive into how you can deploy one.
There are a few ways to create a WordPress staging site. For example, you can opt for a WordPress staging plugin like “WP Staging”, BlogVault or look for a managed WordPress hosting with staging to build an entire site before taking it live.
In this guide, I’ll discuss both these ways of setting up a staging environment.
- What is WordPress Staging Environment?
- How Can You Build WordPress Staging Sites?
- Extend the Cloning Feature
- WordPress Staging Plugin
- Migrate WordPress Site
- Frequently Asked Questions
What is WordPress Staging Environment?
A staging environment also referred to as a staging website or area, is an exact replica of your live site. You can first test changes (and improvements) on the staging site without disturbing the live site. Once everything is working perfectly, just “push” or deploy the changes to the live site.
How Can You Build WordPress Staging Sites?
Every WordPress site launched on Cloudways comes with its own staging environment. Once you are done working on the staging site, point a domain, and/or push changes to the live site using the Cloudways staging environment or a third-party WordPress staging plugin.
WordPress Hosting with Staging
On Cloudways, launching a WordPress based server is a matter of a few clicks. I assume, you already have an account with Cloudways. If not, create one from here.
Once the account has been verified, log in to the Cloudways platform and click Launch.
You will be asked about the server and the application you wish to launch.
In this example, I choose WordPress as the application and DigitalOcean as a WordPress hosting with a staging server. If you wish, you can choose any of the five cloud hosting providers for launching the WordPress staging server.
Access the WordPress Staging Site
Once the WordPress staging website has been launched, visit the WordPress website by navigating to the Applications tab, and select the WordPress application.
Let me define the labels:
- Gets the list of all the Applications hosted by this account.
- This is the WordPress test site. You can see the necessary details.
- The button for the default URL to access the WordPress staging website.
- Expandable menu with more options for the website.
- You can launch more than one WordPress staging site on a single server.
When the WordPress test website loads up, you will see a screen similar to the following:
This is the Application Management screen where you can get your hands dirty. The labels are pretty straight-forward. However, if you want more details, check out the Application Management screen walkthrough.
Access the WordPress Staging Server
Once the staging server has been launched, you can access the server from the top menu bar.
Let me define the labels:
- Get a list of servers hosted by this account.
- Details of the staging server.
- The number of applications (WordPress, PHP, Magento, etc.) hosted on this server.
- Expandable menu with more options for the server.
- Similar to the option of hosting multiple websites on one server, you can launch multiple servers on a single Cloudways account.
Point the Domain
Your WordPress test site is now ready for action.
You can now build it with confidence, and once done, point the domain, Install free SSL certificate and take the domain live.
Note: I assume you have built your WordPress site and made it live by pointing the domain. In the image above, check out the 3rd pointer, I renamed the WP_Staging to Live_WP.
Create Staging for the Live Site & Push/Pull Changes
At this point, you have created a staging environment, built a WordPress site, and have taken it live. If you wish, you can add new themes/plugins or upload your own custom code. The staging site offers a great opportunity to test and evaluate before making any change to the live website. This greatly reduces the chances of enduring a broken website because of untested website changes.
To create a staging environment of your live website, you need to clone it on the same or another server.
Clone WordPress Live Site
If you run a web agency or want to build WordPress sites for your clients, the cloning feature can take care of all your requirements. Whenever your client requires website customization, you can start by cloning the live WordPress website, testing the changes, and then push the changes to the live site.
Let’s walk through the process of creating a clone/staging for a live WordPress site.
Navigate to the Applications tab from the top left menu bar, look for your live WordPress and click ( ⋮ ) to access further options. From the menu that opens up, select Clone App/Create Staging.
Note: I named my live WordPress application as “Live_WP”.
At this point, you will be asked two questions: the server where you want to clone or create the staging site, and whether you want to just clone the website or want to create the staging site for your live website.
IMPORTANT: Remember to check the “Create as Staging” checkbox when creating a staging site. There is a minor, but significant difference between cloning and staging an application:
- Clone creates a replica of the application. However, there will be no synchronization between the original and the cloned applications.
- Staging also creates a replica of the application. However, both the live and the replica applications are in sync. In addition, you can perform Push & Pull actions on both the live and replica versions.
Alternatively, the Clone/Staging versions can also be created by going into the application. Once in, hover on the bottom right orange button and select Clone App/Create Staging.
And, you are good to go!
The process takes a few minutes for creating the staging of your live WordPress site. Once done, you will find the cloned WordPress site under the Applications tab with the label “staging” by the name of the actual application.
Now, the WordPress test site is ready, and you can go ahead and play around with the WordPress site.
Let’s dive a bit deeper.
Staging Management for the Live Application
Access the live WordPress application, and you can see a new menu item with the label “Staging Management” in the left menu. Here is how it looks like:
You can see the following three buttons/options:
- Pull: Pull changes from the staging site to the live site.
- Push: Push changes from the live site to the staging site.
- View Logs: View the logs for the Push/Pull logs actions.
Staging Management for the Staging Site
Go to the WordPress staging website and you will see a new menu item with the label “Staging Management” in the left menu.
The options are similar to the ones found at the live WordPress application. Once you are done with the changes on the WP staging site and are confident enough to push changes to the live website, just tap the Push button. You will be asked:
- Web Application Files: Copy the file changes from Staging Site to the Live Site.
- Database: This will overwrite the Live website database. (BE CAREFUL – You may lose important data if you have made database-level changes at the live website during this time frame)
- Backup: Backup your live website before moving data from the staging site. When you opt for a backup, you will see a Rollback button at the Live Application.
In the same way, the Pull button pulls the changes of the Live website to the staging website.
P.S: Here is a must-read guide with important notes on the Cloudways Staging environment.
Extend the Cloning Feature
Cloudways does not restrict you to cloning applications only. You can also clone, and/or even transfer servers to another account on Cloudways.
- Clone Server: Create a copy of an entire server for the same account.
- Transfer Server: You can transfer a server to another Cloudways account containing the same server IP address.
The above features can be used as a staging server and are very useful if you own an agency and/or build WordPress sites for your clients.
If you are a developer and use a code editor to directly communicate with Git and deploy changes, I would suggest reading this great piece on connecting Sublime with Git and deploy changes to live sites.
WordPress Staging Plugin
Login to your live WordPress website, navigate to Plugins -> Add New, and search for either WP Staging or WP Migrate DB.
In this guide, I will use WP Staging plugin. So to continue, install and activate the plugin.
The WP Staging plugin will ask you to get the pro version or just click the Skip – Start Cloning hyperlink. Before proceeding, do not forget to Backup your WordPress site.
Click the Create New Staging Site button. This will take you to the configuration screen. Enter the Staging Site Name, and explore the other options to choose what you want to clone.
Do not forget to Check free disk space, especially if you have a large live website.
Now, click the Start Cloning button.
The WP Staging site will be created in a few minutes, and you can log in to the dashboard with the admin credentials of your live website.
Now test the changes without affecting the live website. However, pushing changes back to the live site is NOT available in the free version.
If you do not want to pay for the Pro version, go ahead, and take advantage of the complete push/pull website staging environment offered by Cloudways.
Migrate WordPress Site
Do the features of the Cloudways Staging Environment look interesting?
To wrap up this tutorial, I would like to revisit the main premise of the article – Staging sites are an essential requirement for WordPress development workflows. If you have anything to ask about the Cloudways WordPress staging sites or creating a staging server, feel free to ask me in the comments section below.
Q. What Do You Mean by WordPress Staging Environment?
The WordPress Staging environment is a dedicated environment for testing the codebase of WordPress websites. It is an independent replica of the production environment.
Q. What Do You Mean by WordPress Staging Server?
The staging environment includes a staging server similar to the production server. It is always recommended that you create the staging environment on the same spec server where the live site is hosted.
Q. How to Install WordPress on a Staging Server?
Installing WordPress on the staging server is simple. Simply read this article on how to host WordPress on Cloud
Q. What Is a WordPress Staging Site?
A WordPress staging site is a clone/replica of the live WordPress site with restricted access. You can test themes/plugins and any other code-level changes on the staging site. Once you are done, you can then push/pull changes to your live WordPress site.
Q. How to migrate WordPress Staging to Live?
Migrating WordPress staging to live can be done easily through the cloning feature offered by the WordPress hosting with staging providers such as Cloudways.
Q. WordPress Hosting with Staging?
A number of WordPress hosting providers like Cloudways offers WordPress staging environment where you can easily test a WordPress site before making it live.
Start Creating Web Apps on Managed Cloud Servers Now
Easy Web App Deployment for Agencies, Developers and E-Commerce Industry.
Mustaasam is the WordPress Community Manager at Cloudways - A Managed WordPress Hosting Platform, where he actively works and loves sharing his knowledge with the WordPress Community. When he is not working, you can find him playing squash with his friends, or defending in Football, and listening to music. You can email him at email@example.com