Merging WordPress posts from different databases

If you never send/sync Production posts to live.

Then just pull/copy the live database to the development database via mysqldump (or similar) and use wp-config vars to force the site and blog URL.

Use the following in the dev versions wp-config.php to force the URL’s

define('WP_HOME','http://example.com');
define('WP_SITEURL', 'http://example.com');

You may as well sync the entire database, rather than just posts, so then you get all the post revisions as well as any plugin configurations/data.

This is my normal method of developing a live site, locally. (Grab live DB drop Dev DB import Live DB into Dev) (The only fun bit is sending specific plugin configs up to the live site from the dev site)

error code: 523