Staging

Make changes and test things without affecting your live site

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.


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 MWP Cloud sites are automatically and securely backed up every night, and you can download and save any backup from MWP Cloud.
  • 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.

Set Up a Staging Site

You can create a Staging site by visiting the Staging tab of your Hosting control panel. Simply follow the prompts there to create and access your new Staging site, which is a full copy of your live site. Perfect for trying out new plugins or themes, proofing content changes, and other development work.


To copy a website to Staging for the first time, visit the Staging module and click the Start button.


This will generate a copy of your live site with a modified URL, such as: yoursitename.staging.tempurl.host. When the Staging environment is created, a hotlink to the Staging environment will be available under the Domain field.

Staging Options

Move Staging to Production


When you are ready to make the contents of your Staging site live, move them to Production. This will replace your live, or Production site, with the contents of the staging site.


To move your Staging site to Production, click the Go button.


This will open a module where you can select to move the Staging Files or Files & Database to Production.

  • Files – Selecting to move only files will only move the things you can see when you access your site’s file system via SFTP or the Manage Files option in your Hub. That includes your core WordPress files, as well as all your themes, plugins & media files.
  • Files & Database – All of the above plus the entire database, which includes all content and revisions for all post types, navigation menus, widgets, users, comments, plugin & theme settings, e-commerce order data, and WordPress options.


Use the dropdown to select whether you wish to replace only your site files, or both the files and database. Click Move to Production to continue.


Automatic Backups


When moving Staging to your live Production site, the Files or Files & Database of your current production site will be overwritten with the corresponding contents of the staging site.


In the unlikely event that something goes wrong and you need to restore your Production site, you’ll be happy to know that we automatically create a backup of your Production site before the push from staging. You’ll find this backup in MWP Cloud under the Backups tab of your site, labeled pre-staging-push.


Sync Production to Staging


This option will replace the current Staging environment with a fresh copy of Production. All of the Staging files and database will be overwritten.


Click Reset to open the Reset module.


Clicking Confirm Reset will automatically reset your Staging environment. 


Click cancel to close the module without resetting your Staging environment.


Delete Staging


This option will delete the current Staging environment completely. All of the Staging files and database will be lost.

Click Delete to access the pop-up and then Continue to immediately delete the Staging environment or cancel to close without deleting.

Settings

To the right of the Staging Options module, you will find information about your Staging site, configuration options, and settings.


Domain


The domain is the URL created for accessing your Staging site. The domain section will display the URL and is hotlinked so you can quickly access the site.


Note that the links shown here are already encoded with the HTTP Auth username and password you set in the Password Protection section below. So when you click on either of them, you’ll automatically bypass the HTTP Auth. Of course, if anyone enters the plain URL in a browser, they would still need to provide those credentials to access your staging site.


WordPress


The current version of WordPress being run by your staging site is displayed here. If you are testing an update to core on your Staging site, and push to a different version, use the Refresh button next to the version number to verify the changes.


If you are running a different version of WordPress core on your Staging site when pushing back to your Production site, your Production site will be overwritten.


Last Sync


The Last Sync field is the date and time your Staging and Production sites were synced. This can be valuable if you are developing on a Staging site over a long period of time before syncing to Production and don’t want to lose changes in your Production environment.


PHP Version


The PHP Version is the version of PHP being used for your Staging site. This can be used to test your site when Upgrading or Downgrading your PHP version.


Click the pencil icon to switch between the list of supported versions of PHP.


Click Apply to save your changes or click the X or Cancel to close the PHP module without switching your PHP.

Was this article helpful?

1 out of 1 liked this article

Still need help? Message Us