Back to Support Hosting Create a Staging Site

Create a Staging Site

Use a staging site to clone your entire WordPress.com site. You can test significant theme and plugin updates, incompatibilities, or any other major changes on the staging site before applying them to your main production site. This guide will show you how to create a staging site on WordPress.com.

This feature is available on sites with the WordPress.com Creator and Entrepreneur plans. For sites on the free, legacy Pro, Starter, and Explorer plans, upgrade your plan to access this feature.

How to Create a Staging Site

A staging site is a great place to test plugin and theme updates or any other changes you plan to make to your live site.

To create a staging site, follow these steps:

  1. Visit your Sites list in the dashboard.
  2. Click on the site from the list of your sites.
  3. Navigate to the “Staging Site” tab.
  4. Click the “Add staging site” button:
Add a Staging Site button shown.

If you have already created a staging site, you will see a “Manage staging site” button instead:

Manage or delete a staging site via the Staging Site tab in the Site Overview page.

Once you have created your staging site, you can select it from your Sites list, or the drop-down box next to your main site address on the Site Overview page.

Drop-down box to switch to the staging site on the Site Overview page.

How Staging Sites Work

The staging site feature copies your existing site to a new site. The new staging site’s address will start with staging followed by four random characters and the site address.

Your newly created staging site is completely decoupled from the original site; any changes to one won’t impact the other.

The staging site will remain active as long as your production site (i.e., your main, live website) has an active plan. The production and staging sites share the same storage allocation, and storage is split 50/50 between the two.

Data Copied to a Staging Site

The following site-specific data is cloned to your staging site:

The following WordPress.com-specific data isn’t copied to your new site because these features are site-specific:

Features of a Staging Site

The staging site works very similarly to the production (live) site. SFTP, SSH, and phpMyAdmin can be accessed in the same way from the “Server Settings” tab on the staging site Overview page. You can install plugins, switch themes, and restore backups on the staging site, just like on the live site.

Sync Data Between Staging and Production

You can synchronize the database and filesystem between the staging environment and the production (live) environment in both directions. The only exception is for sites using WooCommerce — WooCommerce data cannot be synced back to production due to risks in overwriting orders received after the staging site was created.

You must have access to both the production and staging sites in order to sync changes between them. If a user has access to one, but not the other, add them as an admin to both production and staging so they can sync changes.

Below, learn how to Synchronize Production to Staging and Synchronize Staging to Production.

Customize Search Engine Behavior

By default, search engines will be blocked from indexing the staging site. However, this behavior can be overridden with a custom robots.txt file placed in the root folder of your website.

Synchronize Production to Staging

Before you start working with themes or plugins, we recommend making the staging site a fresh copy of the production site. If you would like to refresh your staging site and make it a copy of the production site again, follow these steps:

  1. Visit your Sites list in the dashboard.
  2. Click on the staging site title in the list of your sites.
  3. Navigate to the “Staging Site” tab.
  4. In the Staging site section, locate the “Database and file synchronization” section.
  5. Select the “Production to staging” option.
  6. Click the “Synchronize” button.

When the confirmation window appears, proceed by clicking “Synchronize”.

Synchronize Staging to Production

Follow the steps below to synchronize media files, plugins, themes, and/or database content, such as posts, pages, and menus, from your staging site back to your production (live) site.

When you are satisfied with your changes and would like to copy them from staging to production, follow these steps:

  1. Visit your Sites list in the dashboard.
  2. Click on the staging site title in the list of your sites.
  3. Navigate to the “Staging Site” tab.
  4. In the Staging site section, locate the “Database and file synchronization” section.
  5. Select the “Staging into production” option.
  6. Select which parts of the staging site you wish to synchronize to your production site:
    • Theme files and directories: Choose this option if you added new themes, upgraded existing ones to the new version, or edited theme files. Note that If you change your active theme, you must activate it on the production site manually unless you synchronize the ‘Site Database‘, too.
    • Plugin files and directories: Choose this option if you installed new plugins, upgraded existing ones to the new version, or edited plugin files. Note that If you activate or deactivate your plugins, you must do the same on the production site manually unless you synchronize the ‘Site Database‘ too.
    • Media uploads: Copy all files and directories in the uploads directory. You must also select ‘Site database‘ if you wish for the files to appear as media uploads in WordPress.
    • wp-content files and directories: Choose this to synchronize all files and directories in the wp-content directory other than themes, plugins, and uploads.
    • Additional web root files and directories: Select this to copy all files and directories in the WordPress root, including any non-WordPress files, excluding the wp-content directory.
    • Site database (SQL): Choose this option if you added or edited posts or pages, uploaded new media, edited site templates using Site Editor, or performed other changes related to data stored in the database. Due to the risk of overwriting orders, this option cannot be enabled on sites with the WooCommerce plugin installed.
  7. Click the “Synchronize” button.
  8. When the confirmation window appears, proceed by clicking “Synchronize”.
The options for syncing staging to production.
Choose the direction of your sync, select which parts of the site you wish to sync, and click the “Synchronize” button.

Please be aware that copying a staging database to a production environment might result in losing existing data on the production site, as the staging data will replace it. WooCommerce data cannot be synced back to production due to risks in overwriting orders received after the staging site was created.

The PHP version in the production environment doesn’t automatically update to match the version you’ve set in staging. To ensure both environments use the same PHP version, you’ll need to manually update the PHP version in production as well. After you’ve finished syncing, you can change the production PHP version by navigating to your site’s Web Server Settings.

Delete a Staging Site

To remove your staging site, follow these steps:

  1. Visit your Sites list in the dashboard.
  2. Click on the production site title in the list of your sites.
  3. Navigate to the “Staging Site” tab.
  4. In the Staging site section, click the “Delete staging site” button.

Frequently Asked Questions

Who can create a staging site?

A staging site can be created by any administrator on your site. The site owner will always be added as the owner of the staging site, even if the staging site was created by another administrator. 

What happens when I clone a site with WooCommerce enabled?

All WooCommerce data in the database will be cloned to the staging site, which may include customers, products, orders, or any other WooCommerce-related information stored in the database. We will also add the WP_ENVIRONMENT_TYPE=staging constant to the wp-config.php file, which some plugins may use to differentiate production and staging environments.

However, while WooCommerce is active on a site, the database cannot be synced back to production due to risks of overwriting orders received after the staging site was created.

Can I create more than one staging site?

It is currently possible to create only one staging site per production site. You can create unlimited copies of your site via our Copy a Site feature.

Can I customize the staging site URL?

The staging site URL is created automatically by prepending “staging-[random-four-characters]” to the production site name. It’s not possible to edit this address or add a custom domain because a staging site is not intended to be used as a live site. To make a copy of your site intended for public viewing, take the steps in our Copy a Site guide instead.

Was this guide helpful for you?

Not quite what you're looking for? Get Help!

Copied to clipboard!