Get the Best WordPress Backup
& Migration Plugin Today
Get Duplicator Now

Duplicator Blog

Everything you need to know about the Duplicator plugin.

WordPress staging site

How to Create a WordPress Staging Site (For Safe Testing) 

Do you want to set up your first WordPress staging site?

A staging site can be an effective place to test out new changes without affecting your live WordPress website. It’ll be an exact but independent copy of your site where you can adjust coding or update plugins safely. 

In this tutorial, we’ll show you how to create a WordPress staging site!

What Is a WordPress Staging Site?

A WordPress staging site is a copy, or clone, of your live website. This staging site is exactly the same as your website, except it cannot be viewed publicly by your visitors. Plus, if you make changes to the staging website, it won’t affect your live blog or small business site.

What Is the Benefit of Having a WordPress Staging Site?

Staging sites are used to test changes in a safe environment. You can perform updates, tweak coding, or do a complete redesign without breaking your website. When you’re ready, you can make these changes live.

Whether you’re a blogger or an ecommerce website owner, you can benefit from creating a staging site. Using a staging site, you can modify your website without any risks. 

If you decide to update your live WordPress site, this may publish visible errors to your audience. When you want to avoid high bounce rates or downtime, it’s important to have a staging site. 

Here’s when you might want to use a WordPress staging site:

  • Installing new themes and plugins: If you install new themes and plugins on your live site, they may conflict with other installed software. A staging site can allow you to see how new plugins and themes will affect your site. 
  • Updating WordPress core, themes, and plugins: Software updates can be safely tested on a staging site to avoid breaking your live site. 
  • Troubleshooting errors: Sometimes, you may see unexpected errors or bugs on your website. If you want to safely troubleshoot them without causing more problems, use a staging site. 
  • Implementing code-based changes: A staging environment can be a test site to play with code and adjust your site safely. 

Ultimately, staging sites can act as a safety net for your WordPress website. If you decide to make a significant change to your live site, it may accidentally break its functionality. Then, you’ll need to go through the process of restoring your website from a recent backup

On the other hand, a staging site won’t affect your live site at all. You can adjust your files, design, or other elements until everything looks and feels perfect. Then, simply push your updated staging site to your live server. 

Alternatively, you can set up a new staging site before you ever create a website. You’ll be able to fully design your WordPress website and then make it live when you have a hosting plan. 

How to Create a WordPress Staging Site

Now that you know the benefits of creating a staging site, you’ll probably want to build your own. If you’re a complete beginner, you might feel too overwhelmed to get started. To ease your concerns, let’s walk you through the process, step-by-step!

Step 1: Build the Staging Area

You could install WordPress locally using a service like Local by Flywheel, but you might want your staging site to be on your hosting server. This avoids any potential errors when you migrate changes between a staging server and your live server.

To get started, open the dashboard for your WordPress hosting account. For this tutorial, we’ll be using Bluehost. Then, find the Domains » Subdomains » Add Subdomain:

Bluehost add staging subdomain

You can then name your subdomain Staging and hit Add Subdomain:

Staging site subdomain

After this, continue to the next step!

Step 2: Install Duplicator 

Once you manually set up a new staging area on your server, you’ll need to clone your live website and move it to the staging site. To do this, we’d recommend installing Duplicator Pro. This is the best WordPress plugin to start cloning, migrating, or backing up any website:

Duplicator plugin

To start using Duplicator, select a subscription that meets your needs. Although there is a free version, Duplicator Pro supports drag-and-drop migrations which can help you easily push content to and from your staging site. 

After your purchase, download the plugin and copy your unique license key. Next, open the WordPress dashboard for your live website and install Duplicator Pro. If you need help with this, check out this step-by-step guide on installing WordPress plugins.

Finally, you’ll need to activate your license key. Head over to Duplicator Pro » Settings » Licensing. Here, paste your license key:

Duplicator license key

Then, hit Activate. Now you’ll be able to create a copy of your website and easily move it to your staging site!

Step 3: Create a Package

If you want to see how new software or coding will affect your live site, it’s important to transfer an exact copy into your staging site. To do this, start by creating a package. This will compile your live website’s content, WordPress files, plugins, themes, and database tables into a single zip file.

In Duplicator, go to Packages » Create New:

Create Duplicator package

Name your package so you can easily find it later. Then, click on Next:

Production site package

Before Duplicator builds your package, it will scan your live website. It’s important to review any notices to see if they’ll affect the build:

Duplicator package scan

To continue, select Build. Once finished, find the Packages page again. Here, click Download » Both Files next to the package you just created:

Download package files

This will download both an archive and installer file to your computer. The archive file will contain the files and database for your website. The installer is a PHP file that will redeploy the archive file when you add it to a new WordPress installation. 

Step 4: Import Your Package Into the Staging Site

Once you’ve downloaded a clone of your website, it’s time to upload it to the staging site. This will import all of your custom content, which you can then tweak as much as you want.

To upload files to a WordPress website, you’ll need either a File Transfer Protocol (FTP) client or cPanel. Either of these options will allow you to connect to your web host’s server and edit your site files. Usually, your hosting company will recommend a specific file manager for this process.

In this tutorial, we’ll be using cPanel. Once you log in, open the root directory for the subdomain you created. Completely delete any files in this folder and upload your archive and installer files:

Upload staging files

You’ve just cloned your website to the staging area!

Step 5: Create a New Database

Before you can start editing your staging site, it’ll need a new database. The process for creating one will depend on your hosting provider. 

For Bluehost users, open your control panel and find the MySQL Databases button:

MySQL databases
MySQL Databases

Then, you can simply name your new database and hit Create Database:

Create MySQL database

Additionally, the database will need a new user. To create a new one, find the MySQL Users section. Enter a username and password for the new user:

Create MySQL user

Next, scroll down until you see Add User to Database. In this section, select both the new database and user:

Add user to database

Before continuing to the next step, you can assign all privileges to the new user. This will allow the user to fully control the database. 

Step 6: Run the Duplicator Installer

Now it’s time to install the clone of your original site into the WordPress staging environment. To do this, open a new browser window and paste this URL:

This will automatically open the Duplicator installer wizard. Under Setup, enter the details for your new database:

Duplicator installer

Next, hit the Validate button. Be sure to review any notices before accepting the terms and conditions:

Import validation

Once the installation is complete, you’ll be able to log into your staging site:

Website clone login

Simply click on Admin Login to start editing the cloned version of your production site!

Step 7: Add Password Protection

To make sure no one else can access your staging site, consider enabling password protection. This will hide the development area from search engines and the public eye. 

To do this with Bluehost, navigate to Advanced » Directory Privacy in your control panel:

Bluehost directory privacy

Now you’ll need to find the folder for the subdomain. Then, check the box next to Password protect this directory:

Password protect WordPress staging site

Add a name for the protected directory. Lastly, choose a username and password so that you can access the site.

After you save these changes, you’ll be the only one who can edit your staging site!

How to Move Changes from Staging to Production

Once you set up your staging site, you can make any changes without impacting your live site. When everything looks and feels exactly right, these changes can be pushed to production.

To do this, you’re going to package the development site as a backup and migrate it to your live website. First, make sure to install Duplicator on the staging site. 

Then, create a new package. You can follow the instructions included earlier in this tutorial. Then, download the archive file:

Download archive zip file

On your production site, find Duplicator Pro » Import:

Import website archive

Drag and drop the downloaded archive file into this import box. Then, you’ll be able to view details about the uploaded package. To import it, hit Continue:

Duplicator imported package

As a security precaution, consider setting a recovery point. Essentially, you can choose a previous backup of your production site to recover if anything goes wrong. After you select a backup, copy the URL for quick and easy recovery:

Set recovery point

Next, scroll down to the bottom of the page. Click on Launch Installer:

Launch site installer

In the Duplicator installer, select Full install single site to overwrite the production site:

Install type

You’ll also need to review any notices to see if they will impact the installation. After this, accept the terms and notices and click on Next.

Finally, use the pop-up to confirm that you want to proceed with the installation:

Install confirmation

This will automatically start pushing all the changes on your staging site to your live site!

Frequently Asked Questions (FAQs)

Often, creating a staging site can be a difficult task. To help you, let’s answer some common questions.

How do I test my WordPress site before going live?

Before going live, it’s a good idea to test your WordPress site in a staging environment. Using a staging site, you can implement code, install software, or make updates safely. Then, you can simply push your staging site to a live server when you’re ready. 

What is the difference between a production site and a staging site?

A production website is the live site that is displayed to your online visitors. A staging site is a testing environment where you can perform changes without affecting your live site. 

How long does it take to create a staging site?

The length of time it takes to create a staging site depends on the method you choose. Some managed WordPress hosting companies provide built-in staging features to immediately create new staging sites with one click. Alternatively, it’ll take a few minutes to install a plugin like Duplicator and clone your website to the staging area. 

How do I move my website from staging to production?

You can move your website from staging to production by creating a package of the staging site with Duplicator Pro. Then, install Duplicator on your production site and drag and drop the package’s archive file into the import box. 


That’s it! You’ve created your WordPress staging site.

Need to back up your live site before pushing changes from staging to production? Check out our guide on WordPress backups

Do you want to migrate your website to a staging environment without any downtime? Download Duplicator Pro today!