Announcing One-Click Restores, Disaster Recovery, and More
Announcing One-Click Restores, Disaster Recovery, and More
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!
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.
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:
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 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. Since your staging site will be private, any changes won’t impact your SEO.
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.
Now that you know the benefits of staging sites, 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, we’ll explain how to create a staging site, step-by-step!
If your web host doesn’t have a one-click staging site feature, you can easily build your own staging site. This involves cloning your original site and uploading it to a new subdomain on your server. Let’s get started!
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:
You can then name your subdomain Staging and hit Add Subdomain:
After this, continue to the next step!
Once you 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:
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:
Then, hit Activate. Now you’ll be able to create a copy of your website and easily move it to your staging site!
Next, you’ll want to create an exact copy of your website and move it to the staging site. This will let you safely experiment with new software or coding.
To do this, start by backing up your live site. With Duplicator, you can easily 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:
Name your package so you can easily find it later. Then, click on Next:
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:
To continue, select Build. Once finished, find the Packages page again. Here, click Download » Both Files next to the package you just created:
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 your staging site.
Once you’ve downloaded a clone of your website, it’s time to upload it to the staging site.
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:
You’ve just cloned your website to the staging area!
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:
Then, you can simply name your new database and hit Create 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:
Next, scroll down until you see Add User to Database. In this section, select both the new database and user in the dropdown menus:
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.
Now it’s time to install the backup of your original site into the WordPress staging environment. To do this, open a new browser window and paste this URL:
https://subdomain.example.com/installer.php
This will automatically open the Duplicator installer wizard. Under Setup, enter the details for your new database:
Next, hit the Validate button. Be sure to review any notices before accepting the terms and conditions:
Once the installation is complete, you’ll be able to log into your staging site:
Simply click on Admin Login to start editing the cloned version of your production site!
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:
Now you’ll need to find the folder for the subdomain. Then, check the box next to Password protect this directory:
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!
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’ll need to back up your development site 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:
On your production environment, find Duplicator Pro » Import:
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:
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:
Next, scroll down to the bottom of the page. Click on Launch Installer:
In the Duplicator installer, select Full install single site to overwrite the production site:
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:
This will automatically start pushing all the changes on your staging site to your live site!
Some WordPress hosting providers allow you to create staging sites with one click. This is a simple way to clone your website and host it on the same server.
We’ll show you how to build staging sites with Bluehost, SiteGround, and WP Engine. If you have a different web host, you’ll need to check whether it offers a built-in staging feature.
Every Bluehost hosting plan supports one-click staging. All you’ll need to do is log into your WordPress dashboard and find Bluehost » Staging:
Then, click on Create Staging Site. Bluehost will automatically build your staging site!
Whenever you need to, you can switch from your production site to the staging area:
You’ll see a cloned copy of your entire website. At the top of the page, there will be a red bar marking it as the Staging Environment:
Continue to make any changes without worrying about them affecting your live site. When you’re ready to deploy them, head over to Bluehost » Staging and hit Deploy All Changes:
If you’re a SiteGround user, start by logging into your hosting control panel. Click on the Websites tab and hit Site Tools:
Next, navigate to WordPress » Staging. Select your website and name your new staging site. Finally, click on Create:
To prevent unauthorized users from accessing your staging content, consider adding password protection. In your SiteGround account, click Go to protected URLs. Then, add a username and password for the staging site:
Now you can log into your new staging site:
To push any staging changes to your live website, go back to this page in your control panel. Click on the three-dot icon and hit Full Deploy:
WP Engine is another WordPress host that includes one-click staging in all of its plans. To get started, select your site in the WP Engine control panel:
Then, click on Add Staging:
From the list of options, choose to Copy an existing environment to this site. Next, select the production site that you want to clone:
Name the staging site. Make sure the Environment type is Staging:
Once your staging site is created, you can add password protection. Simply go to Staging and click on the padlock icon:
Find the Utilities tab and copy the username and password for your staging dashboard:
To start editing the staging site, hit WP Admin:
Once you’re ready to push your changes live, click Copy environment:
Finally, choose the staging site as the Source environment. The Destination environment should be your live site:
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.
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.
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.
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.
To create a WordPress staging site for free, install the Duplicator Lite plugin. With this free tool, you can build a complete backup of your live site. Next, set up your staging environment using LocalWP, MAMP, WAMP, or XAMPP (all free tools).
Create a new database for your staging site. Then, pull up your staging site’s files and upload the archive and installer files you downloaded earlier:
Finally, launch the Duplicator installer wizard. For more information, check out our guide on how to move a live WordPress site to a local server!
Alternatives: The WP Staging plugin is another free tool for building WordPress staging sites. If you want extended features like one-click staging or password protection for your local development site, WP Stagecoach is a popular premium staging site plugin.
That’s it! You’ve created your WordPress staging site.
While you’re here, you may also like these extra WordPress tutorials:
Do you want to migrate your website to a staging environment without any downtime? Download Duplicator Pro today!