Importing posts from old website to new conflicting post ID’s?

I can confirm that the imported post will get a new unique ID if (and only if) there already is an existing/conflicting ID in the target database.

Given a post to be imported with an ID of 7579 (represented in the WXR export file as <wp:post_id>7579</wp:post_id>) and an existing post with that exact same ID already in the target database, the generated ID for the imported post was 7583.

(As far why 7583? I would have thought auto increment but 7579 was an existing post, 7580 a revision of that post and 7581 a draft of some sort. So not exactly sure why 7582 was skipped.)

Leave a Comment