How to Merge Staging Site to Production And Keeping Posts & User-Generated Content

Question: Sometimes we published new posts on the production site while developing new features on the staging site.
Can WP Staging handle this case?

Answer: If you want to push only your theme and plugins you can usually do this by selecting the database table wpstg[int]_options and selecting your theme and plugins directories in the WP STAGING push menu.

The table wpstg[int]_options contains all your WordPress and plugin settings.

If this is sufficient depends on whether you did further additional changes to the tables posts/postmeta on the staging site or if you did not modify them any further since cloning the site the first time.

For instance, page builder plugins and plugins that use custom post types usually store their content in the tables _posts/_postmeta.

In that case, you can not merge that extra data with the data in your production site automatically because WP STAGING can not know what data you want to keep and what data should be overwritten

So, if you changed the posts table as well, We recommend exporting the new posts that were created/updated on the production site and import them into the staging site until your staging site has all the data you want to push to the live site.

Then you can push the entire staging site without worrying to overwrite any new content on the production site.

In either way, it’s highly recommended to have a full backup of staging and live site before you do the push.

Updated on May 21, 2021