Migrate from Movable Type 4 to WordPress 2.6 in 10 Steps
I recently migrated my personal blog from Movable Type 4 to WordPress 2.6 after being dissatisfied with the sluggishness of Movable Type, confused by its often unintuitive interface, and irritated that upgrading from version 3 to version 4 broke my site templates and rendered my comments unusable.
I had put off migrating for months, worried that it would cause even more problems, or that I would lose posts or comments in the process. Fortunately, no such thing happened. The migration went very smoothly and took about two hours. There were only a couple little speed bumps along the way, but hopefully in outlining them here, others will be able to get past them a little faster.
Here are the steps I took:
1. Preparation. Checked my site analytics to see which pages on my blog were being accessed the most by visitors. This part was useful for setting up the URL redirection in step 6. If you don’t have any analytics on your site’s traffic, you may want to set up a Clicky or Google Analytics account and let it collect data for a week or two first.
2. Export. Exported my blog posts and comments from Movable Type. Unfortunately, the migration guide provided online by WordPress is admittedly “obsolete,” according to a note at the top of the page. Keep it nearby, but note the following change:
In MT 4, the export tool can be found by logging in and clicking on the System Overview menu in the upper left of the page and selecting the Tools option. On the page that comes up, choose the Export option from the links in the left column. Then on the next page, choose the Select Blog link. It should be straightforward from there. I saved my exported blog as a text file on my local drive.
3. Converting (or not). The WordPress guide tells you to check to see if your MT blog posts were encoded with something other than UTF8 and provides some options for converting your exported file to UTF8 (WP’s default encoding) if you need to. This is to ensure that special characters, like curly quotes and letters with accents, or characters in other languages, don’t get mangled when you import into WP.
Since the quotes in my export file seemed to be standard straight quotes, and since I didn’t recall using special characters in my posts at all, I didn’t bother — and haven’t noticed any problems as a result. If you’re not sure, you may want to run your export file through one of the recommended conversion utilities just to be safe.
4. Backup. I simply tarred up all the files from the directory where my blog lives so that I could recover the Movable Type blog in case something went wrong with the WordPress installation.
tar cvzf backup.tar.gz public_html
5. Database Creation. I created a new MySQL database and user for that database via my hosting provider’s account control center. Since this database is separate from the one where my Movable Type blog is stored, I didn’t bother to backup the MT database — but you may want to anyway, just to be safe.
6. Temporary Redirection. I added some mod_rewrite rules to the .htaccess file in my blog’s directory to ensure that visitors to my site would see an appropriate message (rather than a mess) while I was setting up WordPress. In a nutshell, my mod_rewrite rules looked for attempts to access any of the popular pages noted in Step 1 and instead redirected visitors to an index.html file containing my “please wait, we’ll be back soon” message.
The WP migration guide has some info on how to do this. (Note that this method only works if your hosting provider is set up to let you modify your .htaccess file and has mod_rewrite installed.) Note that you want to use index.html instead of index.php for your “please wait” message because the WordPress installation itself contain an index.php file.
7. WordPress Installation. I unzipped the WordPress files into my blog directory. I also made this directory world writeable for the time being. I changed it back later, after installation was done, but I find it’s easier to let WordPress 2.6 write settings to the configuration file and even update the .htaccess file on its own — and to do that it needs write access.
8. Import. The WordPress guide tells you to edit a file called import-mt.php in the directory wp-admin/import/. However, the import tool in WP 2.6 has a standard Browse button that lets you directly select and upload the exported MT file from your local drive. That route seemed simpler; I took it; it worked.
9. Configure. I selected a theme for my site, set up the sidebar, turned on smart URLs, and so on.
10. Final Redirection. Finally, I modified my .htaccess file again to now redirect people who might visit old Movable Type URLs to their new WordPress equivalents.
I also deleted the index.html file that had my “please wait” message. You can rename the file if you want to keep it, but leaving it named index.html would be a problem because most Web servers will continue to serve up index.html instead of index.php if the former exists.
And that was it — I’ve now got a WordPress site, not a Movable Type one. Not too bad, right?
My name is Amit Asaravala. I'm an Internet technologies consultant & Web developer located in the San Francisco Bay Area. I specialize in helping organizations build great Web sites on open source technologies.
Hi there! I am trying to do what you have done (go from Movable Type to Wordpress).
It all sounds straightforward, except your bit about modifying .htaccess to redirect old permalinks.
My permalink structure in MT was:
http://www.mydomain.com/blog/archives/000348.html
In Wordpress, it will now be:
http://www.mydomain.com/08/2008/This-is-my-post
Is that the situation you were in? How did you remedy it?
Thanks,
Jess
Hi Jess,
The difference between your old URL structure and your new URL structure makes it pretty hard to set up automatic redirection for every post on your site. Essentially, there’s no component of the old URL that you can really reuse in the new URL.
What I did instead is set up specific redirects for the popular pages, for the category pages, and for the RSS feeds. For everything else, I just did a catch-all redirect that takes anyone accessing an old URL over to my new home page.
Alternatively, you could have the catch-all redirect go to a custom 404 page with a message encouraging visitors to check out specific parts of your site.
Hope that helps!
THANK YOU!
You’ve saved me from a million head aches with this guide. Simple, easy to follow, straight to the point.