Merging versions of wp_posts based on post_title

Found it with help from a Twitter follower! Might be handy for others.

Get your backup table and import in to your live DB with a new name, e.g. wp_posts_updated. Then run this query:

UPDATE wp_X_posts LEFT JOIN wp_posts_updated ON wp_posts_updated.post_name = wp_X_posts.post_name SET wp_X_posts.post_content = wp_posts_updated.post_content WHERE wp_posts_updated.post_name = wp_X_posts.post_name

DON’T import your backup wp_posts into multisite using the table name wp_posts! You’ll overwrite a blog’s content.