3 Ways to Create a WordPress Staging Site

A WordPress staging site isn’t as tricky as it looks. It is a test site that you can easily create to test themes and plugin updates. Sometimes a regular update can crash your site. 

A staging site is always helpful as it keeps your leading or live site safe. It will allow you to test those updates before making them to the live site. 

In today’s article, I’ll walk you through the step-by-step process of creating a WordPress staging site using different methods. You can use any of the following methods to make your staging site. 

First, let’s get more information about the WordPress staging site. 

What is a WordPress Staging Site?

A staging site is an identical clone of your live website that is kept hidden from the general public and is used for testing updates or features. This will help you to keep your live site safe from any errors. 

A staging site gives you the freedom to test any plugin, theme, or update without any risk. Sometimes you see some tutorials on youtube and try to implement them on your site, which can break your site. 

Instead of testing them on a live site, you can create a copy of your site that will be the staging site and try those features of updates there without the risk of breaking your site. 

Why Do You Need to Create a WordPress Staging Site?

There could be several reasons you should create a WordPress staging site. Even if you have a local development environment, I strongly recommend having a staging site for the following reasons. 

  • To experiment with the code and develop new features for the site.
  • Make use of it as a testing ground for your server's configuration.
  • Use it for troubleshooting or as a backup to keep your leading site safe. 

Anyone who wants to avoid live site downtime while updating should use staging sites. A web developer, content writer, substantial corporate website, small business owner, or blogger who wishes to run their website could create a staging site. 

Anyone who wants to maintain a website needs a staging site. Now let’s dive into the different methods to create a WordPress staging site. 

How to Create a WordPress Staging Site?

There are three main methods to create the staging site. I’ll explain each method in detail. You can use any method you want. 

1. Create a WordPress Staging Site Using Bluehost Web Hosting

There are several WordPress hosting in the market, and most popular hosting platforms like GoDaddy and Bluehost offer you a one-click staging site with their choice plus and pro plans.  

Depending upon the hosting you are using, this method can differ. 

For this tutorial, I’ll be taking the Bluehost example. You can visit their documentation to create a staging site if you use different hosting like GoDaddy, SiteGround, or Hostinger. 

1.1. Navigate to Bluehost Staging 

You can create a staging site from the WordPress dashboard. When you create your site on Bluehost, it installs its plugin on your site. 

To create a staging site, navigate to Bluehost » Staging from your WordPress admin dashboard. 

1.2. Create a WordPress Staging Site

Click the ‘Create Staging Site’ button on the staging page to create a Bluehost staging site. 

1.3. Switch to Staging Site

Bluehost will set up your website's staging environment. When it is done, you'll receive a success message and the option to toggle between the production and staging sites.

If you want, you can simply click the Clone to Staging button to copy the content and design of the live site to the staging site. 

Simply select the radio button next to the staging site, and Bluehost will redirect you to your staging website.

When you switch, you'll notice a button at the top of the page showing that you're working on the staging website.

You can now work on your site without any fear of crashing it. Your live site is now completely secure, and you can make changes on the staging site you want. 

1.4. Deploy Changes From Staging to Live Site

Let’s say you have cloned your live site to the staging site to test or add new features and design layouts. You can follow this step if you want to deploy those changes to the live site. 

To do so, navigate to Bluehost » Staging from your WordPress admin dashboard. 

Now you’ll see a dropdown in front of the staging site. Please select ‘Deploy All Changes’ from the dropdown by clicking the down arrow button (▾ )to move the changes you made from the staging to the live site.

This will display a pop-up asking you to confirm that you want to deploy the staging site to the production site. To proceed, click the 'Deploy' button.

Bluehost will immediately deploy your staging site to live. This may take time, depending on your website's size.

After deployment, the pop-up will close, and a success message will be shown. You can now switch to your live site to see the changes. 

2. Create a WordPress Staging Site Using a Plugin

Even if your web server doesn't offer a staging site, you can easily create one using a WordPress plugin.

There are drawbacks to this approach.

  1. A plugin has restricted hosting server management. Thus, it may not produce the best outcomes.
  2. The plugin I'll be using may also have servers where your staging site will be kept. This is probably not the best scenario for you if you value your privacy and the security of your personal information.

That being said, let’s explore how to create a WordPress staging site using a WordPress plugin.

2.1. Install and Activate the WP Staging Plugin

There are several plugins available in the market that can help you to create a staging environment. I’ll use the WP Staging plugin. 

To install it, navigate to the Plugins » Add New from your WordPress dashboard and search for the plugin name in the search bar. 

You’ll get the plugin; please click the ‘Install Now’ button to install it. Once the plugin is installed, the install now button will be replaced by the ‘Activate’ button. 

Click the ‘Activate’ button to activate the plugin.

2.2. Navigate to WP Staging

Once you have installed and activated the plugin, please navigate to WP Staging » Staging Sites from your admin dashboard. 

2.3. Create a WordPress Staging Site

Once you are on the staging page, please click the ‘Create New Staging Site’ button to create a staging environment. 

2.4. Clone Your Site

After that, you’ll be asked to give a name to the staging site, but it is optional. You can also manually choose the files you want to clone to your staging site. 

For the advanced settings, you’ll need the pro version. 

Once everything is done, click the ‘Start Cloning’ button to clone the site to staging. 

Once you click it, cloning will start. It will take some time, depending on the size of your site. 

2.5. Visit Your Staging Site

Once the cloning is completed, you’ll see the ‘Open Staging Site’ button that will take you to your staging site. 

Once you click it, you’ll be redirected to the staging site, but you’ll be asked to fill up the admin credentials to log in to your staging environment. This will be asked only once. 

On your staging site, you’ll notice the orange admin bar telling you that this is the staging site. Moreover, the URL will also include the staging word. 

If you want to clone your staging site to the live site, you’ll need to purchase the pro version of the WP Staging plugin. 

3. Create a WordPress Staging Site Manually

The third and last method to create a staging site is manual. It is quite a complicated method, but it can be the most secure method if everything is done correctly. 

This strategy also causes website downtime when deploying updates from staging to live. This method includes working with hosting and databases. 

You may be using a different hosting, but you can still follow the following steps to create a staging environment. 

To manually create a staging site, you must log into your hosting account's administration area. In addition, you'll need to adjust some settings in the database and the code, copy over all the site files, and then paste them into a new subdomain directory.

That said, let’s dive in to create a WordPress staging site manually. 

3.1. Create a Subdomain

To create a subdomain, navigate to your hosting dashboard and click the Subdomains button, and you’ll be redirected to the page to create a subdomain. 

You can also search for it if you are having difficulty finding the subdomains option. 

Enter the name of the subdomain and click the ‘Create Subdomain’ button to create it. 

3.2. Create an FTP for Subdomain

Next, you’ll need to create an FTP for your subdomain. To do so, look for the FTP Accounts option from the hosting dashboard. It’ll be in the Files section. 

Now in the ‘Create a New FTP Account’ section, you need to select the directory in which you created the subdomain. To select the directory, you just need to write the directory name after the /public_html/.

1. Create FTP Credentials

Now, you need to enter the username and password for the FTP account. These will be used explicitly for the staging site. 

Once you have entered the credentials, please click the ‘Create’ button to create FTP credentials. 

3.3. Copy the Live Site to Staging Site

Once you have created the FTP credentials, you need to copy the live site to the staging site. It depends on you, and if you want to clone your live site to a staging environment, you can follow the steps onwards. 

Otherwise, you can install a fresh WordPress to your staging site using your hosting. Then you can use it for testing features and more. 

But for this tutorial, I’ll give you complete information, including cloning your live site to the staging site. There are two ways to do so. I’ll mention both of them.

3.3.1. Using Plugin (All in One WP Migration)

You can simply install the All in One WP Migration plugin to your live site, create a backup, and download and upload it to your staging site. 

Remember you must have the All in One WP Migration installed and activated on both sites. 

This is the easiest way to clone your live site to a staging site, but it is not that convenient. 

3.3.2. Manually (Using FTP)

I'll do everything manually as we are creating the staging site manually. To copy your live site to the staging site manually, you need to install the latest WordPress to your staging site and then copy the core files from the live site to the staging site. 

You can use the site’s FTP (not the ones we created in this tutorial. You can find the live site’s FTP credentials on the FTP accounts on your hosting.)

Note: If you don’t want to do everything manually, you can simply install WordPress to your subdomain from your WordPress hosting. 

3.3.2.1. Download the Latest Version of WordPress

First, you need to download WordPress to your computer. You can download it from the official WordPress website. Once the zip file is downloaded, you need to extract it. 

3.3.2.2. Download FileZilla

Now download the FileZilla client software to your computer. You can download it from the official FileZilla site. After downloading it, please install it.

3.3.2.3. Connect to Your Site/Host Via FTP

Open the FileZilla software, and you’ll see a blank screen. 

You'll need the FTP address provided by your web host and your FTP username and password to access your site via File Transfer Protocol (FTP). 

Your hosting account information will include your login credentials. The host may provide information on where the FTP address is stored if you request it. It's also possible to get in touch with them directly.

Once you have all the details, please fill in the information inside the FileZilla and connect with your host. Once the connection is successful, you’ll see a similar message as in the following image. 

3.3.2.4. Upload the WordPress Files to Subdomain

Now, we need to upload the WordPress files we downloaded and extracted in the previous steps. This will install WordPress to the subdomain folder.  

To upload the files, please select all the files from the left window of FileZilla, right-click, and select Upload to upload all the files to the subdomain directory. 

Depending on the server connection speed and your system, it will take some time to upload all the files. 

3.3.2.5. Copy Your Live Site to the Staging Site

Once WordPress is installed on the staging site, we need to replace the wp-admin, wp-content, and wp-includes folders with the live site’s folder. 

To do so, first, we need to download those three folders from the live site. Please connect to your live site using FTP in a new window and download the three folders. 

Once the folders are downloaded, you need to upload them to your staging site. 

To do so, you need to navigate back to the FileZilla folder of the staging site and select the folders from the left window, right-click and select Upload the files. 

After that, you’ll see a popup asking you to confirm if you want to overwrite the existing files. Please select Overwrite, Apply to Queue Only, and click OK to start replacing the staging site files with the live site. 

This will copy your live site to the staging site. 

3.4. Export Your Database

Once the live site is copied to the staging site, we need to export the live site's database. To export the database, you can also install a plugin on your live site and export the database file. 

The other way to export the database is by using phpMyAdmin. You just need to access the phpMyAdmin from your WordPress hosting dashboard, click the Export tab, and click Go to export the database. 

3.5. Create a New Database

Once the database file is downloaded, we need to create a new database for the staging site. To create a new database, you need to open MySQL Databases from the hosting dashboard or cPanel. 

After that, you need to give a name to the database and enter the username and password. Finally, click the Create button to create the database.

3.6. Import the Database

Once the database is created, we need to import the database we exported in the previous step. 

To import the database, please find the database you just created from the phpMyAdmin dashboard, click the Import tab, and click Go to start importing the database file to the new database. 

3.7. Connect New Database To Your Staging Site

Once the database file is imported to your new database, we need to connect the database to the staging site. 

To connect them, we need to edit the wp-config file on your staging site and add the new database details. 

From FileZilla, please right-click the wp-config file of your staging site, right-click and hit the View/Edit option to open it in the default editor of your computer. 

Note: Ensure you are editing the wp-config file of your staging site. 

Once the file is open in your editor, you need to replace the database name, username, and password with the one we created in the previous steps. 

Note: Do not change anything else without knowing what you are doing. I have highlighted the things that you need to replace. Only change the database name, username, and password.

Once you have connected the new database with your WordPress staging site, please save the settings. Once you save it, the file will automatically be uploaded to your staging site. 

If it is not updated, then you need to upload it and overwrite the existing wp-config file on your staging site. 

3.8. Restrict Access To Your Staging Site

Congrats, you have created your WordPress staging site manually. 

Finally, you just need to log in to your staging site and restrict access, so search engines do not index it. 

To do so, navigate to Settings » Reading from your staging site WordPress dashboard and check the Discourage search engines from indexing this site box. 

After that, don’t forget to save the changes by clicking the blue Save Changes button at the bottom of the page. 

How to Push Changes to Your Live Site?

Once you have made some changes to your staging site and want to implement those changes to your staging site, you’ll need to redo the above steps. 

You need to download the staging version using a plugin and delete the existing files from the live site. This will keep your site down for a while. 

After deleting the files, you need to upload the downloaded ones to your live site to implement the changes. Also, please don’t forget to backup your live site before making any significant changes. 

Conclusion

That’s it for today’s article. 

I hope this article was helpful to you and you were able to create a WordPress staging site easily. I have covered all the possible ways of creating a WordPress staging site. You can use any of them according to your expertise level. 

But I recommend any of the first two methods because they are easy and will not make your site down even for a second. 

But if you create your staging site manually, your site will be down for a while, even when you upload the changes from the staging site to the live site. There are better methods to create a staging site than this one. But it depends on your choice and expertise.

Brian
Brian

Welcome to the AovUp blog, where we discuss all things WooCommerce. I hope we can help you achieve something today...

Leave a Reply

Your email address will not be published. Required fields are marked *

We – and our partners – use cookies to deliver our services and to show you ads. By using our website, you agree to the use of cookies as described in our Cookie Policy