For building a WordPress site, what you usually do? Build a localhost first then move WordPress from localhost to a server or build directly on your respective hosting provider? For instance, if your WordPress site is live but you want to update the current WordPress version or want to install new plugins/themes. In this situation, what will you do? Directly deploy changes on a live site? This is the first thought that comes to everyone’s mind.
Well, this is not the best practice. Everyone is well aware of the fact that, it is always recommended not to deploy/test any changes to a live site. In fact, working on a WordPress staging site eliminates the chances of a negative impact on the crashed site.
To overcome this issue, you need a managed WordPress cloud hosting provider that provides one-click staging hosting to build an entire site before making it live. Here is a checklist that we are going to cover in this guide.
WordPress Staging Guide
- What is a Staging Environment?
- How Cloudways Build a WordPress Staging Environment for You?
- Extend the Cloning Feature
- Migrate WordPress Site
What is a Staging Environment?
Staging environment also referred to as staging site or area. It is the clone of your complete live site. You first test changes on a staging site, if something goes wrong, you can fix it accordingly. Once everything works perfect, just deploy the changes on a live site.
How Cloudways Build a WordPress Staging Environment for You?
Every WordPress site launched on Cloudways comes with a staging environment where you can build a complete WordPress site. Once staging is done, point a domain, and/or push changes to a live site using Cloudways built-in functionality or a third-party WordPress staging plugin.
Install WordPress on Cloudways
On Cloudways, installing a WordPress site is just a few clicks away. I assume, you already have an account with Cloudways, if not, you can easily create one from here.
Once created successfully, you will see a screen like below, click Launch.
It will ask which application and server you want to launch. In this example, we choose WordPress and DigitalOcean as our WordPress staging environment, however, you can choose any of the cloud hosting providers as a WordPress staging server.
Access to the WordPress Staging Site
Once the WordPress staging site is launched. You can get into the WordPress site by navigating to Applications tab and select your WordPress site.
Let me define the labels:
- Get a list of Applications hosted on this account.
- This is our WordPress test site along with the necessary details.
- The default URL to access our WordPress staging site.
- Options to do more with this site.
- You can launch more than one WordPress staging site on a single server.
Get into the above WordPress test site and you will see a similar screen like below.
This is the Application Management screen where you can get your hands dirty. The labels are pretty straight-forward if you want to get more details, give a read to WordPress Application Walkthrough.
Access to the WordPress Staging Server
Once the staging server is launched. You can get into the server via the top menu bar.
Let me define the labels:
- Get a list of servers hosted on this account.
- Details of our staging server.
- Number of applications (WordPress, PHP, Magento etc) hosted on this server.
- Options to do more with the server.
- Just like hosting multiple websites on one server, one can launch multiple servers too.
Point the Domain
Your WordPress test site is ready to play with. Build it with the confidence, and once done, point the domain, Install free SSL certificate and live the domain.
Create Staging of Live Site & Push/Pull Changes
Ok so, you have created a WordPress site and made it live. But, you want to add a new theme/plugins or use a custom code. As said before, it is always suggested to test changes on a staging site before making any change to a live website. This will reduce the chances to have a broken website while making changes.
To create the staging of your live website, you need to clone it on the same or another server.
Clone WordPress Site
If you run a web agency or want to build WordPress sites for your clients, then cloning feature manages all your needs. Whenever your client requires modifications in the code, you just need to clone his WordPress application, test changes, and push changes to a live site. In the same way, you can use it for yourself.
Let’s start the process of creating a clone/staging of a WordPress live site.
Navigate to the Applications tab from the top left menu bar and click ( ⋮ ) to open further options, click Clone App/Create Staging.
Note: I named my WordPress application as “Live_WP” when the domain was pointed in the above steps.
It will ask you the server where you want to clone or create a staging site and you want to just clone the application or want to make it as staging for this application? Do not forget to check the “Create as Staging” checkbox if creating a staging site. There is a small difference in cloning and the staging:
- Clone: It will create a replica of an application but there will be no synchronization between the two.
- Staging: It will also create a replica of an application but both, live and the replica will be synced and one can perform Push and Pull functionalities. This will create a perfect WordPress staging environment.
Alternatively, the same Clone/Staging can also be created by getting into the application and hover on the bottom right orange button and select Clone App/Create Staging.
And then, here you go!
Cloning process will take a few minutes to create the staging of a WordPress site. Once done, you will find the cloned WordPress site under Applications tab labeled as “staging” just beside the actual title.
Now, you are free to test anything on a staging WordPress site.
Let’s dive a bit more.
Staging Management on Live Application
Get into your live WordPress application and you will see a new label “Staging Management” on the left. Here is how it looks like:
You can see there are three buttons defined as:
- Pull: Pull changes from a staging site to the live site.
- Push: Push changes from live to the staging site.
- View Logs: Push/Pull logs can be viewed from here.
Staging Management on Staging Application
Get into your staging WordPress application and you will see a new label “Staging Management” on the left. Here is how it looks like:
The labels are the same as the live WordPress application. Once you are done with the changes on a staging application and are confident enough to push changes to the live website. Press the Push button it will ask a few options:
- Web Application Files: Copy the file changes from Staging Application to the Live Application.
- Database: This will overwrite the Live application database. (Be Careful while doing so, you may lose the data if you have made database level changes on the live website during this time frame)
- Backup: Backup your Live Application before moving data from Staging. If backed up, you will see a Rollback button at Live Application.
In the same way, Pull button pull changes of the Live application to Staging application.
P.S: A must read guide with important notes on staging can be found here.
Extend the Cloning Feature
Cloudways does not restrict you to clone applications only, but you can also clone, and/or even transfer servers to another account on Cloudways.
The above features can be used as a staging server and are very useful if you own an agency and/or build sites for your clients.
If you are a developer and uses code editor to directly communicate with Git and deploy changes, then I would suggest you give a read to connect Sublime with Git and deploy changes to a live site.
Migrate WordPress Site
Features listed above looks interesting? Want to make a copy on Cloudways to try the WordPress staging environment? Well, we care for YOU. You can easily a migrate WordPress site to Cloudways using our “WordPress Migrator Plugin”.
WordPress Staging Plugin
A number of plugins like WP Staging and WP Migrate DB can also be used to pull a live site to the staging environment. However, pushing changes back to the live site is available in their pro versions.
If you do not want to pay for Pro versions, go ahead, and take advantage of the complete push/pull and backup WordPress staging environment offered by the Cloudways.
Q. What Do You Mean by WordPress Staging Environment?
A. WordPress Staging environment is the environment for testing that resembles the actual production environment. It is an independent replica of the production environment.
Q. What Do You Mean by WordPress Staging Server?
A. Staging environment includes a staging server that is similar to the production server. It is always suggested to create WordPress staging environment on the same server where the live site is hosted.
Q. How to Install WordPress on a Staging Server?
A. Installing WordPress on staging server is just a few clicks away. Give it a read to host WordPress on Cloud.
Q. What Is a WordPress Staging Site?
A. A WordPress staging site is a clone/copy of your live WordPress site with restricted access. You can test themes/plugins and any other changes on staging site. Once you have tested your changes, you can then push/pull changes to your live WordPress site.
Q. Migrate WordPress Staging to Live?
A. Pulling a live site to the WordPress staging site is quite easy that can be done by using cloning feature offered by the hosting provider like Cloudways.
Q. WordPress Hosting with Staging?
A. A number of WordPress hosting providers like Cloudways offers WordPress staging environment where you can easily test a WordPress site before making it live.
To wrap up this tutorial, I would say that the staging environment is the most important element in modern web development. If you have anything to ask regarding the WordPress staging environment or creating a staging server, feel free to ask me in the comments section below.
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 firstname.lastname@example.org
Start Growing with Cloudways Today.
Our Clients Love us because we never compromise on these