halvorsen.org random header image

Migrating old Blosxom content to WordPress

August 5th, 2007 · 2 Comments

There seems to be no out-of the box solution for moving a site with several levels of subcategories from Blosxom to WordPress and keeping the subcategories intact. Neither Jason Clark’s, nor hohndel.org’s suggestions worked for me without a lot of work. I’ve had no luck with the WordPress wiki or the standard ways of importing from Blosxom to WordPress.

Importing straight from RSS to predefined categories worked best for me and that’s how I will migrate. This will detail and make available the steps for future reference.

The instructions assume that you have a little bit of Unix knowledge and login/filetransfer access to the server where your site is hosted. WordPress should be installed and working. The custom rss flavour and modified rss-importer mentioned will be downloadable soon.

  • Download and install the rss20wp flavour to your Blosxom installation. This borrows the slug setup from Jason Clark, so your old Blosxom filenames (minus the txt-bit) will match the slug of WordPress. This makes it easier to redirect your old Cool URI-permalinks
  • Make a copy of your blosxom.cgi script and call it blosxom.wp. Increase your num_entries to ie 9999 to make sure all content makes it to the new RSS feed and set rss20wp as the default flavour in blosxom.wp. Create a new directory and point $static_dir to it. Set $static_entries = 1;
  • Run blosxom.wp with ie path/blosxom.wp -password="mypass" -all="1"
  • Zip (zip -r) up the directory containing all your rss20wp files and transfer the resulting zip file to your PC (or Mac)
  • Unzip the zip archive on your local computer
  • Make a backup copy of rss.php in your blog server’s wp-admin/import directory and install my slightly modified version
  • In WordPress you can now run Manage/Import/RSS and do a small scale import with a couple of posts to check that you are happy. Point the import to an rss20wp-file for an individual post or a small category and run the importer
  • The posts are not categorized. In an ideal world all categories and subcategories could have been created and posts inserted where they belonged in the old Blosxom world, but I’ve found no tool that does this to satisfaction. So you will have to manually point the posts to their categories in WordPress (and write redirects in your .htaccess file). Your full export (including all subdirectories) of rss20wp files and the Bulk Category Manager plugin for WordPress should hopefully make the migration a little bit smoother (note: this plugin does not do subcategories). I have just imported all my “sports” posts into their subcategories by pointing to “sports/index.rss20wp” on my PC. If you do not need categories or have few posts you can simply import from the top-level index.rss20wp
  • Redirection to old cool-URLs. I haven’t done this yet, but it will be based on the imported WordPress slug. All the old Blosxom posts have unique file-names and the import uses these as slugs. All my new WordPress permalinks are simply /%postname%/ (ie slug), so the redirects should be simple to set up (more on this later). For the old categories themselves it should hopefully just be a matter of redirecting ie “arts/music” to “category/arts/music”
  • If you had a static image directory in your old blog, these can be redirected with ie redirect 301 /img http://www.halvorsen.org/wp-images in your .htaccess file
  • Redirecting an old rss-feed to WordPress feed can be done the same way (or use an XML-redirect). The old feed at halvorsen.org is now redirected with RewriteRule ^index.rss$ http://www.halvorsen.org/?feed=rss2 [R=301,L]
  • When changing WordPress themes the .htaccess file gets overwritten with a basic one. Make sure you take backups.
  • I’ve also added some of my old CSS-customization, for Cutline and other themes that have a .custom class this is easily done by adding .custom in front of your old CSS-classes. So I have ie,
    .custom code, .custom kbd, .custom pre {
      font-family: "VT-100", "Courier New", monospace;
      font-size: 0.75em;
  • Depending on your setup it might be useful to know how to convert from iso-8859-1 to utf-8

Tags: Cat1 · Cat3

2 responses so far ↓

  • 1 Motherboard I’d Like to Fuck » Helping a friend migrate from Blosxom to Wordpress // Aug 28, 2008 at 02:42

    […] (but perhaps not main ones?) won’t be moved, unless you use the RSS importer (which is what halvorsen.org recommends and gives instructions on). There’s another thing, a bloxsom posts and comments […]

  • 2 Aurlog conversion done « Aurlog // Mar 12, 2009 at 22:43

    […] so there this isn’t the end of said world. Using mod_rewrite magik (with some hints from Halvorsen), I have however managed to make sure the ten most looked-at posts from the last year or so will […]

Leave a Comment