How to migrate from Movable Type to Wordpress
With 1 Comment »
After migrating from Movable Type to Wordpress I guess I should describe the experience and give some tips. Yeah, in the end I didn’t even need to switch, but as seen as I have I may as well stick with it. If I come to loath it I’ve still got the MT database.
Installing a fresh installation is a piece of cake, as long as the php code has read/write access to the directory you plonked it in, which shouldn’t be an issue on shared hosting providers. You just visit index.php and click a bizarrely obscure link that tells it to setup the config file for you automatically. The link is labeled something like “ah ok, go ahead and do it…i guess”. Which is a strange thing about wordpress, lots of the labeling and literature is written as to be “hip”. It’s all quite silly.
Anyway once the obvious things have been done, you should install the following plugins straight away, before you import any entries. You install them by plonking them in wp-content/plugins and then visit the plugin page on the dashboard and click “activate” against the plugin.
Underscore Permalinks: Wordpress replaces spaces with hyphens when creating the permalink, whereas Movable type used underscores. This plugin makes wordpress do it in the movable type style, this is all part of keeping your links the same as MT had them.
Ultimate Tag Warrior: If you want tagging support this will do the trick.
Once you have activated Underscore Permalinks you can continue, visit your MT installation and export your stuff. Back to WP, go to import on the dashboard, choose the movable type option and follow the instructions. After this, you need access to your SQL database using something like PHPMySQL, do you know what your MT installation was capping your basenames to? Some MT installs were making the basenames 15 characters, mine seemed to have been making them 30 characters, if you don’t know, visit your MT blog, go to one of your entries that had a really long title and see what the URL was capped to, count the letters. When you know, run this SQL on your WP database…
UPDATE wp_posts SET post_name=SUBSTRING(post_name,1,15);
Change 15 to whatever yours was capping them to. Now back in the WP dashboard go to Options and then Permalinks and change custom to this…
/%year%/%monthnum%/%postname%.html
You’ll no doubt cotton on to what that did so change it as necessary if your MT wasn’t generating the entries in the same place as mine was.
No doubt, your feeds are now in a different place as they were on MT, and now all the people who were reading your blog with an RSS reader are going to think you’ve fallen silent. I had trouble fixing this, I had problems with some of the htaccess rewrite rules worked on my local machine but not on the remote machine. In the end all I got to work was this, which isn’t quite as transparent as I wanted, they tell the browser/reader to redirect to another page…
RewriteRule ^atom\.xml /wp-atom.php [R=302,L]
RewriteRule ^index\.xml /wp-rss.php [R=302,L]
Add these 2 after “RewriteEngine On”, in the .htaccess file (wordpress will have created one if you didn’t have one already). Oh, .htaccess is hidden by the ., some ftp clients will have to told to display hidden files.
I wrote a php script for converting the tags which are now built into MT 3.2 to WP’s Ultimate Tags Warrior plugin. Well I say convert, for this script to work you need both the MT database and WP database accessible from the server. And I don’t guarantee it to work. Edit tempmigtags.php (nicename) find, //change these, and work out what you need to change them to, if you can’t work it out, it’s probably best you don’t run it. Download tagmigrate.
Converting your MT’s templates to work with WP is complicated. And well you’ll just have to work it out yourself. Sorry.
UPDATE: Actually I’ve just discovered Ultimate Tag Warrior has the option of doing the meta keywords itself. So you don’t need Tags in the Head.
So one of the first thing’s I do of a morning is to wake up the mac and check bloglines, in the hope that the sooner i do that and catch up on the gossip the sooner I can get on and do other things. There’s getting to be too much of the damn stuff though and i’m not sure what the reason is, partly I suppose it is that I keep adding more blogs to my feed without taking some of the oldies out, but also I think the blogs such as boing-boing and gizmodo with their multiple contributors are just writing way too much these days. They go on and on and on. I think there should be some way of filtering out posts, maybe by tag, say choose on bloglines not to have any posts that are talking about microsoft in your feed. A rating system might be an idea as well, although that would be very difficult to implement, it could involve a 5 star rating against each blog post and each time you rate a post it’s sent to some kind of central service such as technorati, and then when you RSS Reader collects todays feeds it can check each post against the ratings at technorati and bin any that are below 3 stars. Well, i dunno, it’s an idea.
Is it safe yet? I’ve added a bit of holiday spirit to my site by adding a christmas tree, unfortunately there was nowhere to put it so Misty here is kindly holding it aloft for us.
Been playing some more with my tag code of wonder. It’s now more scalable and customisable. Plus it seems to work on IE now.