Exporting revisions

How do you export revisions for posts?

I cloned a site with it’s complete WordPress DB 4 months ago.

After the clone revisions have been made to the existing posts and new posts has been added to the original DB.

How can i extract these revisions and add them to the new DB’s pages/posts? Or export them in their entirety with all revision data? (No changes has been made to the clone)

It seems you can only export posts via the WordPress Export Tool, but this doesn’t export the revisions, and also doesn’t add new revisions to existing posts.

Is this feasible through a custom advanced queries or with a plugin?

The logic for such a query would look something like:

1) Get all posts from date to date

2) Extract them WITH all of their revisions (instead of wordpress export that ignores all revisions and only exports the final post)

3) On import add new revisions to existing posts

4) Or add new posts with all revisions

I guess as long as you can compare posts in the two DB’s and be certain that they are the same regardless of different ID’s you should be able to add new revisions to existing posts. So maybe the point of comparison should be the GUID.

Thanks!

0

Leave a Comment