As I recover from a pretty dire week, I thought I should make better use of the virtual server I have with unixshell, so I decided to switch this blog from typepad to wordpress. I thought it would be a relatively difficult process (main concern was not to break permalinks), but it actually ended up being pretty simple. It’s not quite complete, but I thought it would be worth blogging the steps of my migration here. It’s not an exact step by step guide, but should help.

  1. Download the latest version of wordpress and follow the 5 minute install guide.
  2. Temporarily used an url of, and added an appropriate entry in my local hosts file to allow it to be resolved.
  3. Added a virtual host for in my apache config, and added as an alias.
  4. Exported content out of typepad (Manage | Import/Export) and saved file as import.txt
  5. The big problem was always going to be making sure that my typepad permalinks continue to function so that existing links from other blogs and search engines just continued to work. Luckily, there is a set of instructions for making wordpress use movable type permalinks on the wordpress codex.
    • Set up a custom permalink structure (Options | Permalinks). However the custom structure you should use is /%year%/%monthnum%/%postname%.html
    • Install the Underscore Permalinks plugin – you have to do this before importing your content
    • Imported content into wordpress – (Import | Movable Type), which allows you to upload a local file. (I ran into some trouble here – had to change the wp-content directory permissions to 777 temporarily, after which the import worked just fine)
    • Typepad truncates post titles in the URL at 15 chars. So, we have to do the same in the imported wordpress content. Run this SQL: UPDATE wp_posts SET post_name=SUBSTRING(post_name,1,15)
    • If you have some long titles that are common – as I did when I started off 5 posts with Blogging 4 Business…, then you’ll have to manually add the _1, _2, _3… to the post_name field for each of those entries
  6. Installed wordpress feedburner plugin, and then updated the feed details in feedburner.
  7. Added a nice theme.
  8. Tested, and when everything looked fine repointed my dns and waited. I have control of my domain – (using godaddy), so repointing it is simple
  9. Hey presto – new blog, and no links seem to be broken.
  10. Added permanent redirects for old feeds – in .htaccess add the following lines Redirect permanent /index.rdf [feedlocation]
    Redirect permanent /atom.xml [feedlocation]
    Redirect permanent /rss.xml [feedlocation]
  11. Great – mod_rewrite really is useful. Typepad format monthly and category pages are now redirected to wordpress using the following .htaccess mod_rewrite magic: # monthly archive: domain/2005/12/index.html -> domain/2005/12/
    RewriteRule ^(.*)([0-9]{4})/([0-9]{2})/index.html $1/$2/$3/ [R=permanent,L]
    #category archive: domain/metrics_and_roi/index.html -> domain/category/metrics_and_roi/
    RewriteRule ^(.*)([a-zA-z]*)/index.html /category/$1/ [R=permanent,L]

So far, pretty much everything is working, however, there is still stuff left to do:

  1. Add equivalents for the legacy feeds from the old site
    • RSS 1.0 feed:
    • RSS 2.0 feed:
    • Atom feed:
    • Comments feed:
  2. Get monthly archives working – typepad used format of /year/month/index.html, but wordpress doesn’t have the final index.html. There’s a plugin somewhere that forces this.
  3. Add blogroll
  4. Tinker

Let me know if something is unclear, or if I’ve got something wrong, or if there’s a better way ! Some other helpful posts:

[tags]wordpress, typepad, migration, switch[/tags]