Technical notes on migrating from MovableType to WordPress

Having just migrated from MovableType to WordPress here are my notes just in case they help anyone else.

Time it’s taken from empty wordpress to viewing complete posts: about 6 hours
Time it would take to do now knowing exactly how to solve problems: about 1 hour
Time you need to allow…. decide for yourself based on your past experience of migrations!  I was happy with 8 hours or less.  Oh, and there are few broken images I need to find and some hard coded html within some old posts I need to look into.

1) Setup wordpress (d’uh!)

2) Install Plugins

3) From MovableType, delete spam comments from the database

I had 15,000 spam comments in my database.  Removing them turned a backup that took over 15 minutes to create (at which point I gave up to investigate why it was so slow) to less than 2 minutes.  I did this using Mysql workbench.  It was pretty clear what sql commands to use for me, but if you’re finding it hard post a comment and I’ll work it out again and post. It was something like

"Select * from `mt_myblog`.`mt_comments` WHERE `spam_field` = -1;"

Then having checked I was correctly selecting the records that were spam, using DELETE FROM instead of SELECT *.

4) Generate the MovableType full backup.

This is good, it includes images and comments.

5) Import the backup file using the MovableType Backup Importer Plugin.

I had two gotchas. 1) I had a non-ascii character within my xml file.  There was a solution on the plugin forum – a one line perl command that fixed the file by removing the non ascii characters. I was too lazy to see what they were. 2) The Gandi Simplehost php max execution time is 120 seconds.  The scripts was taking more than that to import my blog (some 600 entries, a 2mb xml file and a few hundred images).  It turns out I just had to keep running the import routine until it finished. It recognised the entries it had imported and skipped them and after 3 or 4 attempts everything was imported and I got the success message.

6) Setup redirects for the old MT page names to the new WordPress names

My MT permalinks were /YEAR/MONTH/some-name.html.

In WordPress the default is /YEAR/MONTH/DAY/some-name/

So, I changed the WordPress default to /YEAR/MONTH/some-name/ then installed the Redirection plugin.  I created a redirect with regex match (to tick the REGEX box too):

Source: /(d*)/(d*)/(.*).html
Target: /$1/$2/$3/

This regex matches slash – any number of digits – slash – any number of digits – slash – any character and any number of characters before – “.html”.

I then get those 3 regex matches and rebuild the correct URL. There are probably easier ways of doing this, but it seems to work OK.  I’ve started by using a temporary redirect but once I see that I’m picking up all the right 404 errors and not creating any new ones I’ll make it permanent.


2 responses to “Technical notes on migrating from MovableType to WordPress”

  1. MarionePatt

    Thanks for sharing! Your post is quite useful, though a bit confusing for non-techie users, like me. Why not give a try to online converters (like CMS2CMS ( and let Movable type website be imported to WordPress absolutely hands-off without any scripts?
    Following this tutorial I managed to convert to WordPress without ringing the bell of a developer. Hopefully, it will help somebody.

    1. Firstly:
      Anyone considering using a web service to export from one platform then import to another platform *MUST* consider the security implications. Giving up your passwords and user account ID’s… generally not a good idea. Sure you can change them after, but the service could insert another user you don’t know about, or hidden code, giving them access at a later date. **I THINK USING A WEB SERVICE ONLINE CONVERTER IS DANGEROUS!**
      Most blog software has export/import functionality, this is a lot safer.
      In my opinion – AVOID CMS2CMS. Why? I think this comment was spam (an advert, for that service). Apparently, CMS2CMS promote their product by spamming, therefore I would NEVER recommend or use a product like that (if they’re willing to dishonestly spam blogs like mine along with ( then perhaps their convert code is also doing bad things with your data and server.

Leave a Reply

Your email address will not be published. Required fields are marked *

Search this site

Free apps

  • – Your birthday or other celebration date based on [years on other planets] / [how many seconds/days] / [how far you’ve travelled around the sun]
  • – Calculates the combination and how many 1st, 2nd, large 1st and large 2nd class Royal Mail stamps you need on large envelopes and packets

Recent posts