Support Home > Developers > Staging Sites

Staging Sites

With Staging Mode, you can clone your site to a staging environment without polluting the data used by WordPress.com.

Note: This is specifically for online, staging sites. If you have a local development site, you’ll want to follow the Offline Mode guide instead.

The Jetpack plugin tries to automatically detect staging sites based on the default way WordPress defines environments and patterns used by some hosting providers. We’re usually able to detect staging sites and automatically enable Staging Mode on the following platforms:

  • WP Engine
  • Kinsta
  • DreamHost
  • Pantheon
  • Flywheel
  • Cloudways
  • Azure
  • WPServeur
  • Liquidweb
  • WP Stagecoach

However, this won’t work in all cases. If needed, you can manually turn on Staging Mode by adding define( 'JETPACK_STAGING_MODE', true ); to your staging site’s wp-config.php file. Make sure you add it before the /* That's all, stop editing! Happy blogging. */ line.

Using Staging Mode

When your Jetpack site is accessed in staging for the first time, you will get a “Safe Mode” warning as Jetpack will notice that the staging site is a copy of your production site.

Safe Mode in Jetpack

Since this is a “new” site, you will want to click the button “Create a fresh connection”.

Manual Process

In terms of a workflow between your production and staging sites, we’d advise the following:

  1. Migrate the database from your production to staging site.
  2. Make sure to flag the staging site with Jetpack staging constant. 
  3. At the “Safe Mode” prompt, click “Create a fresh connection”.
  4. Make your changes on the staging site.
  5. Migrate your changes back to your production site.
  6. When you access your WP Admin on your production site, click “Create a fresh connection” when the “Safe Mode” prompt displays.

Automated Process

If your hosting provider includes functionality to create a staging site using an automated process, you can use that. When accessing the staging site, you will get a “Safe Mode” prompt

You will want to “Create a Fresh Connection”, make your changes, and then deploy staging to production.

The flow, in this case, would be:

  1. Clone to Staging.
  2. Staging site will enter “Safe Mode”.
  3. Create a fresh connection.
  4. Make changes to the staging site.
  5. Move to production.
  6. On production, you will get the “Safe Mode” warning again.
  7. Create a fresh connection since this is now a “new” connection compared to the staging environment.

How Staging Mode Works

While in Staging Mode, your staging site will act like your production site in virtually all ways, except no data is passed up to WordPress.com and you cannot disconnect the staging site (to prevent an issue that would lead to problems with your production site).

Jetpack Features that Will Not Work in Staging Mode

  • Backup
  • Scan
  • Search
  • VideoPress

How to Disable Staging Mode

If your site is hosted with one of the providers listed at the top of this page, and we’ve automatically placed your site into Staging Mode, there may be certain situations where you want to disable it — for example, in order to test Jetpack features that don’t work in Staging Mode. To disable it, you can add this line of code to your theme’s functions.php file:

add_filter( 'jetpack_is_staging_site', '__return_false' );

Still having trouble?

Please contact support directly. We’re happy to lend a hand and to answer any other questions that you may have.

  • Table Of Contents

  • Categories

  • Contact Us

    Need more help? Feel free to contact us.