Importing Movable Type into Wordpress with Tags

 

I spent many frustrating hours trying to import a Movable Type into Wordpress. For some reason the standard import script doesn’t import data such as tags and projects like Ultimate Tag Warrior are defunct.

 

But I don’t like to be beaten, and didn’t want to re-tag hundreds of posts. So after some experimentation, I managed to find a way to import tags! And that process is detailed below for anyone else having the same problem.

 

What this procedure will do

It will import Movable Type post content, titles, dates, categories and tags into Wordpress.

 

What this procedure can’t do

Import authors, it seems. But to be honest I didn’t need to, so I never pursued it. You may be able to do this by buying the professional version of ImportCSV (more details at the end of this article).

 

Disclaimer

I provide this just to hopefully help others. I take no responsibility if you mess things up. Of course, always make backups... I had to wipe my data numerous times while experimenting to get this right.

 

Exporting data from Movable Type as CSV

1)      Login to the MT admin and switch to the blog you wish to export.

2)      Select Design > Templates.

3)      Select Create index template.

4)      Give the template a name, and in the main template area paste the following:

5)      Under Template Options, select a location and filename for your ouput file. As you will need to upload this with your browser later, I suggest creating the file into a publically accessible area so you can download it easily. For example /home/mywebsite/ csvoutput.txt.

6)      Click Save, and you’ve just created a CSV output of your blog.

Tip: if your content changes, and you need a new CSV file, just click Save and Publish when editing the template. A new CSV file will be generated.

 

Adding CSV import capabilities to Wordpress

1)      Visit ImportCSV. There is a Pro version of this Wordpress Plugin, which you may wish to explore. However for the purpose of this guide, the free version is fine. To receive this, subscribe to the site’s newsletter in the bottom right hand corner. Use real details, as you’ll be emailed the free plugin.

2)      The plugin requires a few manual code changes, so whether you do this before uploading to your server or edit the files while on the server is up to you.

a.       Edit import_csv/pear/File/CSV.php and go to the line which says
$seps = array("\t", ';', ':', ',');
Replace the comma towards the end of the line with a tilde symbol ~ so it should look like this:
$seps = array("\t", ';', ':', '~');

b.      Next edit both 1.php and 2.php in the root of the plugin directory, and change
'sep'    => ",",
to
'sep'    => "~",
(Admittedly I’m not sure if this step is essential, but it’s just easier to do it!)

3)      Install the plugin in the usual fashion if you haven’t already done so (see standard Wordpress guides for help on this). Then activate the plugin.

 

Importing into Wordpress

1)      When logged into Wordpress, and with your plugin activated, you should now have a Import CSV option under the Tools menu. Click it.

2)      You should simply have a browse dialog. Point it at your CSV export created earlier.

3)      Click Submit, and that should be it. Hopefully you’ll have one imported Movable Type blog, with keywords.

 

ImportCSV

As has been mentioned above, this guide uses the free version of ImportCSV, because it supported the data that I needed to import. If you have more complex import needs, and wish to import authors, then please explore the site at importcsv.com. The Pro version of the plugin may be more suitable, and you can modify my guide above to export and import more data.

I am in no way affiliated with that site – so please direct any questions about ImportCSV to the creators of the plugin.

 

Date

Guide Version

Details

28/8/09

1.0

Guide first created