Staging Websites - Best Practices

This document provides guidance on using the features of the Staging tool included with every SWS hosted site.

Matthew Gabriel

Last Update há 6 meses

Staging Best Practices

A staging environment can be a very useful tool, but it does have its limitations. When considering using a staging environment for any reason, always keep this important point in mind:


  • When you move your staging site to your production site, the changes you made on staging will not be merged with your live site. Rather, your live site will be overwritten with the staging data and/or contents.


As an example of the above, if you have an active e-commerce site and receive new orders or signups while you’re making changes on staging, you would lose those orders & signups when staging is pushed to production if you select to move both Files & Database.


However, if you only made changes to some theme or plugin files on staging, and selected to move only Files when pushing staging to production, then your new orders & signups would be preserved in the production database. See Move Staging to Production below for more info.


Here’s a quick breakdown of how to best leverage your staging environment, and when not to use it.

Recommended Uses of Staging


  • Use staging to test themes & plugins for compatibility, layout & design issues, etc.
  • Use to test theme & plugin updates before updating them on your live site.
  • Use to test custom modifications to plugin & theme features & functionality before making such changes on your live site.
  • Use to test custom CSS or code tweaks before making such changes on your live site.
  • Use to check for PHP compatibility before updating the PHP version on your live site.
  • Can be used to edit content or data stored in the database (posts, pages, products, etc, or widgets & various settings), as long as content is not being actively updated on your live site in the meantime.

When NOT to Use Staging


  • Don’t use staging to edit any content or data stored in the database (posts, pages, products, product variations, orders, etc, or widgets & various settings) when content may be actively changing on your live site in the meantime (like an active e-commerce site, forum, or regularly updated blog with multiple authors).
  • Don’t use staging as a backup of your production site. All WPMU DEV hosted sites are automatically and securely backed up every night, and you can download and save any backup from your Hub.
  • Don’t use staging to test site performance. Staging resources are very limited and, as such, performance tests would not deliver reliable results.
  • Don’t use staging for long-term development projects as the likelihood of encountering incompatibilities & conflicts increases with time. Such projects may be better suited to local development environments, or separate live sites that can simply be password-protected during development.
  • Don’t use staging if you need to make changes to subsites in certain multisite configurations. See Multisite Staging below for more info.

What If I NEED to Merge Data Changes from Staging to an Active Site?


There may come a time when, for any reason, you absolutely do need to use staging to make edits to content for an active & regularly updated site, then merge those changes to the production site without losing new data.

In such a case, we recommend the following procedure to safeguard data on your live site:


Before Pushing to Production


  • Once you have finished making all your edits on the staging site, temporarily put your production site into maintenance mode. Use the Website Mode module in Branda for that, or any other similar plugin if you prefer.
  • If there are users currently logged into your live site, you may want to force them to log out so they can’t make any content changes while you’re updating the site. The easiest way to do that is to change the security salts in your wp-config.php file. You can do that manually by editing the file, or use the Update old security keys Security Recommendation in Defender.
  • Export the data that you want to preserve from the live site, such as new e-commerce orders, new users, new forum topics, etc.. You can use the options under Tools > Export in your wp-admin, or a handy plugin like WP All Export for that.


Push Staging to Production


  • Click the Go button to move your staging site to production.


After Pushing to Production


  • Import the data contained in the file you exported in the previous step. You can use the options under Tools > Import, or a handy plugin like WP All Import for that.
  • Deactivate maintenance mode on your live site.

Was this article helpful?

0 out of 0 liked this article

Still need help? Message Us