Staging in WordPress: What, why and how?

Harshit Khandelwal
6 min readDec 23, 2021

In this article, we’re going to discuss Staging in WordPress. After reading this article, you’ll have a complete understanding of Staging and how to use it for WordPress development.

But, before we begin, we need to understand a few basic terms to understand the purpose and use of Staging better.

Production Site: It’s a live site that people visit.

Staging Site: It’s also a live hosted site used for testing.

Local Site: It’s hosted on your computer and is used for development.

Introduction and Need of Staging

In simple terms, a staging site is a live hosted site that is identical to a Production site and is used for testing the changes that we’re going to apply on the Production site.

So let’s say you have a WordPress website that is live on the internet and is visited by 100K visitors every month.

Now suppose you want to make a few changes to your website then you can not do it on the live website because if something breaks then it will affect your user experience.

Thus we keep a copy of the live site (Staging Site) where we test the changes and once we’re sure that it’s safe then we deploy the changes on the live website also.

Now there are multiple ways to push the changes from the local site to the staging site and then to the live site.

  1. With the help of Plugins.
  2. Manually; via our database like GIT or FTP or MySQL admin interface.

Pushing your site from one stage to another is very easy using a plugin. All you have to do is just install the plugin, make a backup of your site, and upload this backup to the next stage.

All our files like themes, plugins, media are stored in different folders in the file manager. But the content or information like posts, pages, products, settings is stored in the database.

Note: Beware in certain cases while moving files from one stage to another stage of the website. Consider these scenarios.

  1. Let’s say you want to transfer a plugin from the staging site to the production site. Now, this plugin may have some settings saved in the database so to move this plugin you need to move both the plugin files and the database settings.
  2. Sometimes in the case of the website where the users also generate some content like comments then in that case be careful because if you migrate the complete website from staging site to production site then the changes will be lost.

So to migrate a website from local setup to staging site, we need three things:

  1. Local Development Setup: Refer to this article to see how to set up WordPress locally.
  2. Hosting Provider with Staging: You can use WebSpaceKit for this purpose as they have a seamless staging process.
  3. Migration Plugin: All-in-One WP Migration

We are using the All-in-One WP Migration plugin because:

  • Supported & Updated
  • Free
  • Does exactly what we want

Pulling from Production to Local

We do this process when we want to add a new feature to our site. We also want to ensure that we have the latest version of the site on which we are working.

We’ll make all the changes on the Local site and once we confirm then we test the changes on the Staging site.

At last, if you’re sure that the Staging site is working properly, you can push these changes to the live website.

This is how WordPress developers make changes on the live website, at least when they don’t want to hurt their business.

Now before I begin this process, I’m assuming that you have a live website, and a local website setup.

Secondly, the process of pulling a website from one stage and pushing it to another is the same therefore I’m going to cover only one which is the Staging to Local.

So to install the plugin go to the dashboard of your live site and install the All-in-one WP Migration plugin. To do this,

  1. Go to Plugins and click on add new.

2. Now search for “all in one wp migration” and you’ll find this plugin.

3. Now click on Install Now and then click on Activate.

Once the plugin is installed let’s go to the next step of the staging process where we’ll download the backup of our current website.

Download the Backup for Staging

To download the backup of your website,

  1. Go to the All in One WP Migration option and click on Export.

2. Click on ADD and type your live site URL in the Find space and local site URL in the Replace with space.

3. Click on the Export To button and select the file option.

4. Download the Backup by clicking on download and the file will be downloaded on your computer.

Once the backup is downloaded, we can now go to the next step which is to import this into our local website.

Click on this article to learn How to set up a WordPress website locally.

Import the Backup into the Local Website

To import the backup just install the All in One WP Migration plugin on your local site as we did in the previous section.

  1. Now open your local site’s WordPress Dashboard and go to All in One WP Migration, click Import and select File.

2. Select the File that you downloaded during the Backup and it will be imported.

It will take some time for the complete backup to happen so just wait for some time.

backup happeningn

3. Once the process is complete, click on both the options shown below and click save one by one and then click on Finish.

And now once you finish the complete process then go to your local website and you’ll see that your website has been imported successfully.

So, this is how we pull websites from one stage and push them to another.

Conclusion

So in this article we saw what is staging and how it can help you in making changes to your website.

We also demonstrated how staging works in Wordpress and migrated a website from live stage to local stage.

If you like this article then feel free to subscribe to our email list and drop a lot of claps, till then bye bye.

--

--