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.
You can 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.
Additionally, we are auto-enabling staging mode on some hosting providers, for example WP Engine. You can modify this through the
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).
In terms of a workflow between your production and staging sites we’d advise the following:
- Migrate the database from your production to staging site
- Make sure to flag the staging site with Jetpack staging constant or filter (above)
- Make your changes on the staging site
- Migrate your changes back to your production site
If you do not enable staging mode, you will likely get a ‘Safe Mode’ prompt when connecting your staging site to Jetpack. This is to help prevent Jetpack from recognizing your new URL as the same site and then automatically moving all stats and subscriber information to the staging URL. You can read more about Safe Mode here.
To avoid this, set the site to “Staging” before connecting Jetpack.