How to convert from Movable Type to WordPress

This tutorial was written on WordPress 3.4.1 and works as of WordPress 3.4.1.

Part 01 – Installations

  1. Install a FRESH copy of WordPress (http://www.wordpress.org/)
  2. Login to your Movable Type site and export your blog posts. You will be prompt to save a .txt file, which is what you want.
  3. Install the “Movable Type” converting plugin (http://wordpress.org/extend/plugins/movabletype-importer/).

Part 02 – Plugin and Export Changes

Once the plugin is installed we are going to have to edit the plugin and add in the necessary changes to accommodate line spacing because, line spacing in the vanilla plugin isn’t correct and wont register line spacing like it should.

Open wp-content/plugins/movabletype-importer/movabletype-importer.php, find the following:

				// Processing multi-line field, check context.

				if( !empty($line) )
					$line .= "\n";

Replace with the following:

				// Processing multi-line field, check context.

				if( !empty($line) )
					$line .= "\n\n";

Now we will need to edit the exported .txt file from your previous Movable Type installation. Open your exported .txt file and search for the following:

CONVERT BREAKS: __default__

Change the above to the following:

CONVERT BREAKS: 1

Note: There are more than one instance of this and should be mass changed. I suggest going up to “edit” then “replace” and mass replacing the instance, notepad works great for this. Once you are done, save and continue on to step 03.

Step 03 – Uploading Export and Running Conversion

Now that we have made the necessary changes – we are going to want to upload the .txt file to your WordPress folder.

  1. Rename your exported Movable Type .txt file to “mt-export.txt”. This must be named just that or the importer won’t accept it.
  2. Upload “mt-export.txt” to the root of /wp-content/
  3. Once your upload is done – login to your WordPress admin and navigate to /wp-admin/ » Tools » Import » Movable Type and TypePad
  4. Once there click “Import mt-export.txt”

You will be prompt to merge your old usernames into new accounts on WordPress. If the authors are already registered you can select there names from the drop down list. If the authors are not current registered members of your WordPress blog – you can Type there new names in or merge all posts into your account.

Note: If you have a huge blog, depending on your web host the importer might time out. This is fine because, the importer has a feature to not import duplicates BUT when you go back to re import it will prompt you again to type in the new authors. Remember what you did with the previous settings and reapply them. The importer will skip the duplicate article and proceed where it left off.

Repeat this again and again if the importer times out. It will eventually import everything.

Step 04 – Mass Editing Article Slugs

I’ve noticed that after my successful import the article slugs were cut off and had annoying underscores in the actual link. Thanks to “Clorith” from the WordPress IRC Channel – he already had a script that would fix this issue on a mass change level. As you can imagine editing 2,000+ articles would take a long unneeded time.

Read “How to mass change article slug URLs in WordPress” on how to achieve this.

Step 05 – Changing Loose Comment Author ID’s

This step is optional but if you have comments and specially you or another made them, your going to want to make sure the comment ids are linked to your account. Specifically for later use with various addons.

  1. Login to your phpMyAdmin inside cPanel if you use cPanel.
  2. Navigate to your WordPress table and click the “SQL” tab.

Now I have found it easier to select and update by comment_author_email since it’s unique to you.

UPDATE HYv3g_comments SET user_id = '1' WHERE comment_author_email='YOUR EMAIL';

Repeat the above for any other authors you want to mass change or if you used more than one email to comment. Also make sure to change the user_id to the correct user id you are updating.

This concludes the tutorial and if you have any questions feel free to comment. If you are looking for your Movable Type blog to be professionally moved to WordPress feel free to contact us for a quote.

Author: Ryan Kessen

Computer Repair, Freelancer, Blogger, Reviewer and all around nice guy!

2 thoughts on “How to convert from Movable Type to WordPress”

  1. Great article. Thank you!

    I was wondering if you had any trouble migrating the images from Moveable Type. to WordPress?

    In my case, the image paths are very wonky in Moveable Type and I’m afraid that WordPress won’t know anything about the images after I am finished migrating the ~2500 blog posts over.

    Just curious how this aspect worked for you.

    Thanks!

  2. Images ported over fine but are in noway attached to the WordPress. I manually re-uploaded them to each post because, there weren’t that many.

    There is a plugin “Add From Server” which will import all your images to the media section in WordPress, but will in no way be attached to posts. I would suggest uploading the images to a separate folder and then using the “Add From Server” plugin to import them to the Media section of WordPress and then mass updating the IMG tags in your post to reflect the new folder.

Leave a Reply

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