Back to Support Hosting Sync Between Staging and Production Sites

Sync Between Staging and Production Sites

This guide explains how to transfer changes from your staging site to your production site (or vice versa) and what to watch out for. After testing your theme or plugins on the staging site, use this guide to apply your changes to the production environment.

Consequences of Synchronization

It’s important to be aware that synchronizing a staging site’s database to a production environment will result in losing existing data on the production site if that data is not present on the staging site, as the staging data will replace the data on the production site. This includes any posts, pages, media files and any other data stored in the site database.

On WooCommerce sites, this also includes products, orders and customer data. Any new orders, product changes, or customer information added to production since the last sync will be overwritten and permanently lost, replaced with the staging site version.

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.

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

  1. Visit your Sites list in the dashboard.
  2. Click on the staging site title in the list of your sites.
  3. Navigate to the “Staging Site” tab.
  4. In the Staging site section, locate the “Database and file synchronization” section.
  5. Select the “Staging into production” option.
  6. Select which parts of the staging site you wish to synchronize to your production site:
    • Theme files and directories: 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.
    • Plugin files and directories: 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 files and directories: Choose this to synchronize all files and directories in the wp-content directory other than themes, plugins, and uploads.
    • Additional web root files and directories: 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.
      • If you have WooCommerce installed, you’ll see a confirmation box to ensure you want to overwrite your production site’s database, as this could result in losing critical WooCommerce data like orders and customer details.
  7. Click the “Synchronize” button.
  8. When the confirmation window appears, proceed by clicking “Synchronize”.
Choose the direction of your sync, select which parts of the site you wish to sync, and click the “Synchronize” button.

The PHP version in the production environment doesn’t automatically update to match the version you’ve set in staging. To ensure both environments use the same PHP version, you’ll need to manually update the PHP version in production as well. After you’ve finished syncing, you can change the production PHP version by navigating to your site’s Web Server Settings.

Synchronize Production to Staging

Once you have created a staging site, you can refresh it and make it a copy of the production site again using the steps in this guide

To make the staging site a fresh copy of the production site, follow these steps:

  1. Visit your Sites list in the dashboard.
  2. Click on the staging site title in the list of your sites.
  3. Navigate to the “Staging Site” tab.
  4. In the Staging site section, locate the “Database and file synchronization” section.
  5. Select the “Production to staging” option.
  6. Click the “Synchronize” button.

When the confirmation window appears, proceed by clicking the “Synchronize” button.

Was this guide helpful for you?

Not quite what you're looking for? Get Help!

Copied to clipboard!