Blosxom to WordPress – The Glacial Saga Continues

A long time ago, I ditched the tiny elegant Blosxom for the slicker, more user-friendly WordPress. Installation of the new system was a breeze. Importing my entries from Blosxom to WordPress was not so much of a breeze, and it continues to this day.

The method I used to export from Blosxom was to create a new “flavor” (a display template) which would display ALL entries in one long (looooong) list, without paging, and with the dates and times and so on displayed in a specific way. Then I could save the entire page as a single text file, do some minor edits, topping and tailing, and then use the WordPress import tool to import the text file and split it automatically into many individual posts. This seemed to work fine at first glance. But then I looked closer and realised there were a few problems which would require quite a lot of work.

The import did not preserve the categories of the posts, which is fair enough when you consider the mechanism Blosxom uses for posts – it uses the file directory e.g. “blog/travel/europe/berlin”. As a result I have to go through all the posts and re-categorise them manually. This is a chore, but it also means I have been reorganising the posts more logically and with hindsight.

The handy Batch Categories plugin has been very useful, and would be even more so if it were not for one thing. All imported entries are marked as “Uncategorized”, but when you filter your posts in the post management tool, this category shows up as having zero entries. This is apparently impossible, which is not comforting when it’s happening in front of your eyes.  It means you have no way to see at a glance how many posts are left to categorize, and you can’t grab them and fix them in a batch with the plugin.

I even tried to edit the WordPress MySQL database directly using my hosts PHPAdmin system. Each entry is given a category number, and the number for “Uncategorized” is 0  (zero) (I think, working from memory). But the phantom uncategorized posts have the number 0, so they should show up as proper Uncategorized rather than phantom Uncategorized. But they don’t.

Another big PITA is the fact that many of my old posts had a link in them which said “now read on” which linked to a full version of the post. The imported version only had the “now read on” link, and not the full post – many entries were truncated. I’ve had to go through each entry in the old Blosxom, finding the “now read on” links, and copying the remaining text into the equivalent imported entry. This was my fault.

Existing links to old entries in Blosxom have also had to be changed, so they link to the new URLs. I’ve had to use searchable holders like [LINK] to mark where I need to come back later and put in a link to a post which has not been properly imported and categorized yet.

I’m sure there could have been some easier ways of doing all this, but once you’re engaged on a particular soul-destroying course, it’s sometimes better to just see it through. I hope there wasn’t an easier way.