How to make your WordPress staging site live

This guide will show you how to make the changes on your staging or development environment live. We’ll be referring to a WordPress site in this guide, however the same steps can be followed for any web app in our 1-click utility.

If you haven’t already created your staging or development site, you probably want to learn how to create a staging copy of your site first.

We’ll refer to it as a staging site in this article, so if you called your staging site dev, development or testing or something else entirely, be sure to swap staging for whatever you called it.

These steps use our specialized software configuration which makes use of Plesk control panel and Installatron (1-click web apps) for easy web application management. If you are not hosted with us, but your web host uses these tools as well, then this guide will work great for you too.

Not hosting with us?

Want to make creating and syncing data between live and staging this easy for you too? Switch your hosting to Websavers!

There are a few methods for syncing your data between staging and the live site:

  • Fully Automated sync: useful for less dynamic sites, and totally automatic
  • Selective Copy: useful for highly dynamic sites, but it’s a manual process
  • Delete and Clone: works similarly to the fully automated sync. Good fallback option in case auto sync isn’t working for you.

Option A: Fully automatic sync

The sync option in 1-click web apps will overwrite the live website with the staging site, so be sure that the staging site is exactly how you’d like the live site to look, content included.

If new posts of any kind (posts, pages, orders, menu items) have been added to the live site since the staging site was created, that content will be erased and overwritten by the content from the staging site therefore you will need to update the staging site with the new content on the live site before syncing staging over to live.

Here’s a few different ways to transfer changes on live to staging:

  1. The manual way: Manually copy and paste any changes you made on live since you created the staging copy on the staging site.
  2. WP All Export/Import Plugins: An alternative to the built-in WordPress export/import tools is the WP All Export and WP All Import utilities. They will help you export and import only new posts/pages/customers/orders/users from live to staging. See their documentation on how to migrate data between WordPress installs. These utilities do not suffer from the default PHP timeout preventing a complete import and they have automatic detection and prevention of duplicate posts. Note: for basic page/post migration, the free versions should do the trick.
  3. WordPress Official Export/Import plugins: Export the content from live and import it to the staging site:
    • Follow the steps on to exporting content on your live site. It’s best to export each post type that you need to copy over in separate exports (ex: pages, posts). When prompted, select the date range that starts with the date you made your staging copy and ends with today’s date.
    • Temporarily increase the PHP timeout value for the domain in Plesk to 300 (which is 300 seconds / 5 minutes). Be sure to set it back to the default value after you’ve completed the import in the step below otherwise the high timeout value could, in select circumstances, have detrimental effects on the performance of your site. You do not need to do this if you will be using the more advanced wp-cli import option mentioned below.
    • Follow the steps on to importing content on your staging site. Advanced: if you have a very large quantity of content (in particular media) to import, you may alternatively use wp-cli to import without timeouts.

Once your staging site is 100% ready to be made live, with all content updated and ready to go, follow these steps to sync your site from staging to live, overwriting the live site:

  • Login to Plesk then select the 1-click web apps (or Installatron) button to be taken to your list of installed applications.
  • Find your live site in the list and click first on the wrench icon, and then on the sync icon with the two arrows in a circle. (If you do not see the sync icon, check the troubleshooting section below for details on how to fix this).
1-click web apps sync button

On this next screen you’ll see a list of files and a list of database tables. You can deselect those files and tables that you do not want to overwrite on the live site.

If, since the date you created the staging site, you or your site’s users have not altered or added any content to the live site (posts, pages, comments, WooCommerce orders, etc), simply leave everything checked and proceed with the sync to make your staging site live.

This can be crucial for sites with a lot of comments, or other live data that should not be overwritten. CHOOSE CAREFULLY which tables you select/deselect here.

If you have only edited files (like the theme or a custom plugin) on the staging site, and nothing in the database, then you can safely uncheck all database tables (the second list on this page) to complete a file-only sync, making your staging changes live.

Excluding Comments or Users

To skip syncing WordPress comments, uncheck the wp_comments and wp_commentmeta tables (as highlighted in the screenshot)

To skip syncing WordPress Users (including WooCommerce Customers), unchecking the wp_users and wp_usermeta tables (not shown in screenshot).

Then at the bottom of the screen you should leave the option to make a backup before syncing enabled, and finally click the Sync button.

And you’re done! If there’s any issue with the live site after the sync, you can always head to the Backups tab and restore the backup that was completed just prior to the sync.

That’s it! See Next Steps below for optional final changes

Option B: Selective Copy

If you have a WooCommerce store, or membership site with new data being created daily, it may be tricky to identify the individual content pieces that have changed. In such cases a manual copy of changes made to the staging site over to live may be preferred, rather than using the sync tool to do it all at once. Here’s a couple helpful tips on this:

That’s it! See Next Steps below for optional final changes

Option C: Remove live, then clone staging to live domain

This is an older method that we used prior to the introduction of the sync tool, but it can still be used if you prefer it, or if the sync tool isn’t working for you.

  1. Login to Plesk then select the 1-click web apps (or Installatron) button to be taken to your list of installed applications.
  2. For your live site, click the curved arrow button to complete a backup then choose the X button to remove the live app.
  3. Find your staging application install in the list of web apps
  4. Clone your staging app using the button with the two side-by-side arrows pointing down. More details on this process here. Your destination for the clone will be the live domain as we are copying the site from staging to the live URL.

That’s it! See Next Steps below for optional final changes

Tip: if you get an error like “! An instance of wordpress already exists in this directory”: this means you didn’t remove the app (ie: you need to complete step 2).

Next Steps, Tips, and Troubleshooting

Below you’ll find some recommended next steps to complete to ensure your changes show correctly on the live site.

It’s recommended to now clear the cache within any caching plugins you have on the live site, otherwise it may still show the old site or elements of the old site to visitors until the cache’s standard timeout hits (could be many hours or days).

To avoid your browser’s cache from interfering with this process, you should also clear your browser cache at this time.

Now that you’ve rolled out your staging site changes, if you won’t be making any changes to your staging site any time soon, it’s strongly recommended to remove the staging site from within 1-click web apps. It’s not likely to do you any good anyway (unless you’re planning to continue making changes) as by the time you next need a staging site a fresh clone is going to be your best bet.

To do this, in Plesk go to 1-click web apps, find the install in the list that references your staging URL (like staging.<yourdomain>) and click the X button beside it. You can always take a backup first if you’re not sure!

When it goes live, you will want to ensure you either rename all the new page URLs to the original value OR create 301 redirects for each one that has changed. This is necessary at bare minimum for SEO purposes. Details on creating 301 redirects here.

If you’ve followed the steps above and are trying to sync your staging site changes back to live, but there’s no sync button, this is because you cloned the site without checking the box indicating that the clone is to be a staging site.

Not to worry, this can be easily fixed up! In 1-click web apps, select the wrench icon beside the staging site, choose the Advanced tab, and look for the field called “Live Installation URL”. Enter the URL to the website: you will need the http// or https:// but do not include a slash at the end of the URL. Scroll down and press save. You can now follow the steps above under Part 3 Option B.

About Jordan Schelew

Jordan has been working with computers, security, and network systems since the 90s and is a managing partner at Websavers Inc. As a founder of the company, he's been in the web tech space for over 15 years.

Leave a Comment