Chat with us, powered by LiveChat

This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

WordPress 5.2 "Jaco" released with PHP Error Protection & Site Health Check Feature READ MORE

1-Click Push N’ Pull Changes: A WordPress Staging Environment That Users Love to Use!

Updated on May 15, 2019

9 Min Read
wordpress staging
Reading Time: 9 minutes

Developing a WordPress website on a staging environment is an excellent idea for building and 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”, or look for a managed WordPress hosting solution that provides 1-Click staging hosting 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 a 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 Cloudways Builds WordPress Staging Environment for You?

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.

Install WordPress on Cloudways

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.

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 the staging server. If you wish, you can choose any of the five cloud hosting providers for launching the WordPress staging server.

Install WordPress on Cloudways

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.

Access to the WordPress Staging Site

Let me define the labels:

  1. Gets the list of all the Applications hosted by this account.
  2. This is the WordPress test site. You can see the necessary details.
  3. The button for the default URL to access the WordPress staging website.
  4. Expandable menu with more options for the website.
  5. 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:

Access to the WordPress Staging Site - 2

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.

Access to the WordPress Staging Server

Let me define the labels:

  1. Get a list of servers hosted by this account.
  2. Details of the staging server.
  3. The number of applications (WordPress, PHP, Magento, etc.) hosted on this server.
  4. Expandable menu with more options for the server.
  5. 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.

Point Domain Cloudways

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.

Create WordPress Staging Site

Note: I named my live WordPress application as “Live_WP”.

Clone Application

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:

    1. Clone creates a replica of the application. However, there will be no synchronization between the original and the cloned applications.
    2. 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.

Create WordPress Staging Site - 2

And, you are good to go!

Staging Server

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.

WordPress Stagin Site Created

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:

Staging Management

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.

Copy from Staging to Live

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.

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

Several plugins such as WP Staging and WP Migrate DB are also popular choices for creating a staging site of your live website, test changes and push.

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?

Want to try out the WordPress website staging environment? Well, we care for YOU. You can easily migrate a WordPress site to Cloudways using our “WordPress Migrator Plugin”.

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 environment 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?

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?

Pulling a live site to the WordPress staging site 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.

Share your opinion in the comment section. COMMENT NOW

Mustaasam Saleem

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 mustaasam.saleem@cloudways.com

Start Growing with Cloudways Today!

We never compromise on performance, security, and support.

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

THERE’S MORE TO READ.