Post Restoration Project - Dealing with WordPress Post-Kinds Data

At the start of the year I restored a lot of old posts to this site from a WordPress backup. While this worked great for posts that had “standard” content, I was missing hundreds of posts and even more metadata that relied on the IndieWeb Post-Kinds plugin for WordPress. In the export file this plugin data is largely stored as serialised PHP data structures within the XML.

The tool I used to convert the export didn’t know how to handle this data, so I’ve started a project to build a tool which can. It’s in very early stages (literally just a couple of files that aren’t joined up yet), but I think I’ve got one of the harder parts done - a utility function to parse the serialised PHP data into a usable JavaScript object:

a screenshot of a code editor with a dark theme. It displays JavaScript code for a test suite using the Mocha framework. The test is named “unserialie objects using sample data,” and it includes input data which is a string of serialised PHP data, and the expected output which is a JavaScript object. Test coverage for the file is shown as 97.7%

There’s a lot still to do, and it’s going to take me a while to get there, but I’m one step closer to restoring the missing posts.