Created: 2017.04.17
After creating my pages, I realised that I was working off a new database..
I'd forgotten to import the old database, containing the existing posts.
I opened the new and old databases up in SequelPro and was unhappy to find that some of the IDs clashed.
I searched for a way to resolve the issue in phpMyAdmin but couldn't find anything. I could have simply changed the IDs, but I was sure that this would result in broken links between the tables.
I was importing into a Multisite, so I was super paranoid about affecting multiple sites worth of data.
I used UpdraftPlus to back up data from all of the sub sites.
Sounding like a dubious gangster, the WordPress Import/Export functionality was actually all that I needed.
That is, if there was a clash, WordPress didn't tell me about it, as it imported the posts without any warnings.
- I created a dummy site to import the old database
- I used Tools > Export, to export only the posts (posts were the content which I needed to add)
- On the target site, I installed the WordPress Importer
- I imported the exported XML
- I assigned the posts to a new author, as strangely they were attributed to an author from another site, which postdated the content
- Everything was fine