Syncing Posts From Live Site to Staging Site

Question: How can I sync posts from my live site to my staging site (blog/dev)? There have been a lot of new posts while the staging site has been in development, and I don’t want to risk pushing my updates unless the posts are replicated across both environments​

​Answer: WP Staging does not supports real sync operations but you can use the update function to update posts and pages on the staging site.

Another option is to use the WordPress Importer. This plugin allows you to export either Posts, Pages or Media files from your live or staging site. After exporting the specific data you’ll get a XML file which you can import then.

How to Update Posts and Pages with WP Staging?

​To so so just click on the update button and select the tables wpstg_posts and wpstg_postmeta only. Exclude and unselect all other directories and tables!

Attention: Updating means that posts and pages on the staging site will be be overwritten with data from the live site!​

​These tables will be copied over to the staging site. If you have articles on the staging site which you do not have on the live site you should create them first on the live site to prevent that these tables are overwritten.

​My advice for the future is to create content either on the staging site or to update the staging site more often. Then you make sure that both sites are not running much out of sync.

​There is an article about the WordPress database structure which helps you to understand which database table contains data and makes your decision easier which table needs to be excluded when you copy over data from one site to another: