Tuesday, July 13, 2004

HOWTO migrate from blosxom to wordpress

For my piece of mind, please backup your wordpress database before proceeding. I don't want my instructions to cause you to lose data.

  • Grab my mt blosxom flavor files and add to your $datadir. Right-click to save these files:
    content_type.mt date.mt, foot.mt , head.mt, story.mt

  • Edit story.mt and change the line "AUTHOR: marc" to whatever
    username you will be using.

  • If you are using the blosxom clicktrack plugin (00clicktrack),
    disable it.

  • Visit your blosxom site using the mt flavor:
    http://yoursite.local/cgi-bin/blosxom?flav=mt and save it into a
    file named import in your wp-admin directory. You may want to try
    this: lynx -dump http://yoursite.local/cgi-bin/blosxom?flav=mt >
    wp-admin/import.txt

  • Take a look at the import.txt file you just created. There are some
    things you may want to fix now rather than after the import.
    • Lines are wrapped at 79 characters, so long URLs or entry titles may be broken.

    • If you have a habit of using a bunch of dashes to separate text, the importer
      may get confused and think it is the beginning of a new entry. Consider replacing
      - with =

    • All the categories will be something like /nh (based on the pathname). You may want
      to remove the leading slash. You can fix this after import and well as build up
      a category hierarchy, so it isn't a big deal.




  • Follow the standard WordPress instructions for import-mt.php.


  • If you don't like your categories named with a leading slash (eg:
    /nh), then edit your new WordPress categories.


  • Start going through your posts and clean up any messes...