Skip to content

Staging Sites

Use a staging site to clone your entire WordPress.com site for testing purposes. This guide will show you how to create a staging website on WordPress.com.

This feature is available on sites with the WordPress.com Business or Commerce plan.

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:

  • Posts
  • Pages
  • Themes
  • Plugins
  • Media uploads
  • Users
  • Configuration options, API keys, or any database data stored with your 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 at Settings → Hosting Configuration. You can install pluginsswitch themes, and restore backups on the staging site, just like on the live site.

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.

How to Create a Staging Site

To create a staging site, follow these steps:

  1. Visit your site’s dashboard and navigate to Hosting → Overview (or Settings → Hosting Configuration if using the default interface style).
  2. Click the Staging Site tab.
  3. Click the “Add staging site” button:
A Staging Site area on WordPress.com with a heading, description, and blue button that says Add staging site

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

The Staging Site section on WordPress.com for the My Groovy Site staging site with a pink Manage staging site button and a white Delete staging site button

Once you have created your staging site, you can find it under your list of sites and via the “Manage staging site” button.

Sync Data Between Staging and Production

This is a beta feature. If you find that something does not work as expected or you would like to share ideas on how to improve this feature, please contact us and share your feedback.

You can synchronize the database and filesystem between the staging environment and the production (live) environment in both directions.

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

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 site’s dashboard and navigate to Hosting → Overview (or Settings → Hosting Configuration if using the default interface style).
  2. Click the Staging Site tab.
  3. Locate the “Database and file synchronization” section.
  4. Select the “Production to staging” option.
  5. 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.

Caution with WooCommerce

When syncing between staging and production on WooCommerce sites, there is a risk of possible data loss if you’re syncing the site database (SQL).

Any data added to production after the site was last synced from production to staging will be overwritten and permanently lost. This includes orders, product changes, and customer data.

Syncing the site database may be useful in the following circumstances:

1. If a site is under development and not yet launched.
– The store isn’t taking real orders on production.
– You’re working on a staging site and there is no real data to be overwritten on production.

2. If the production site has orders disabled and the production database was synced to staging before making changes.
– If both are true, it should be safe to sync changes from staging to production.

Please proceed with extra caution if you must sync the site database between staging and production.

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

  1. Visit your site’s dashboard and navigate to Hosting → Overview (or Settings → Hosting Configuration if using the default interface style).
  2. Click the Staging Site tab.
  3. Locate the “Database and file synchronization” section.
  4. Select the “Staging into production” option.
  5. Select which parts of the staging site you wish to synchronize to your production site:
    • Themes: 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.
    • Plugins: 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 Directory: Choose this to synchronize all files and directories in the wp-content directory other than themes, plugins, and uploads.
    • Web Root: 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.
  6. Click the “Synchronize” button.
  7. When the confirmation window appears, proceed by clicking “Synchronize.”
options of syncing a staging site to production on WordPress.com

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.

Delete a Staging Site

To remove your staging site, follow these steps:

  1. Visit your site’s dashboard and navigate to Hosting → Overview (or Settings → Hosting Configuration if using the default interface style).
  2. Click the Staging Site tab.
  3. 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.

Proceed with extra caution when syncing from staging to production, as it may result in permanent data loss if not completed correctly. With staging sites, there is a risk that you may permanently lose this data (such as orders and customer details) when you replace the production site with the staging version.

To avoid losing important data, consider alternatives to syncing the staging site to production, such as:

  • If you made small changes to the theme on your staging site, consider manually making the changes again on the production site.
  • If you have added new pages, posts, or products to the staging site, consider exporting them from the staging site and importing them to production.

If you cannot avoid syncing the staging site to production for a WooCommerce store, you may wish to consider closing your store to new orders temporarily. When syncing from staging to production, carefully ensure that all orders, products, and customers are the same on both versions of the site before performing the sync. If there are discrepancies, export the latest data from the production site and import it into the staging site. Then, carefully check the data is correct before syncing the staging site back to production.

If you sync from staging to production and notice that data is missing, you can restore a backup of your production site to before you performed the sync.

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.

Last updated: December 02, 2024