Pressing onward
August 17, 2006 2:44 PM   Subscribe

I'm working on transitioning a blog from Movable Type to Wordpress, and I'm getting hung up on one technical issue

Movable Type includes a Keywords field in every post, and I use it for folksonomy-style tags as a comma-delimited list. I would like for this information to survive the transition, but it isn't easy.

Wordpress' MT importer ignores the Keywords field entirely. Wordpress does not have a Keywords field by default, but it does allow custom fields, and with the Ultimate Tag Warrior plugin, does lots of fun taggy things.

I did find a patch for an older version of the MT importer that updates it to deal with the Keywords field, but the patch doesn't apply to the current version; I know enough PHP to do about half of it manually, but after that, I'm adrift.

thanks in advance (and no offense, Anil).
posted by adamrice to Computers & Internet (5 answers total) 1 user marked this as a favorite
 
This post might give you some ideas.

I think it would be easiest to just export your MT Keywords from MySQL to a CSV file, format that into whatever format WordPress needs to recognize it and then use one of the WordPress import tools to dump that right back into the MySQL database (into the correct respective table, of course). Sounds easy but you'll need to do some tests and finagling to get it just right.
posted by camworld at 5:17 PM on August 17, 2006


Response by poster: Actually, it doesn't sound easy, because I know next to nothing about MySQL.
posted by adamrice at 5:57 PM on August 17, 2006


Actually, it doesn't sound easy, because I know next to nothing about MySQL.

Oooh. Then you're gonna be in trouble.

Because Wordpress doesn't support tags by default, all the standard WP import tools are out. I don't know how UTW works, but if it's like most other WP plugins, it probably adds its own tables to the database, and stores tags by referencing the post ID, a quasi-internal identification system.

Basically, the whole thing will involve you messing around with the database on a lower level than Wordpress offers through its interface. If this scares you, you should either give up or ask a techy friend to help you out. If you don't mind getting your hands dirty, then here's what I would think the basic steps would be:

1) LEARN MYSQL. Obviously you're going to need this knowledge for the next couple of steps.

2) Learn the database tables Wordpress, Movable Type and Ultimate Tag Warrior use. If you look at the tables in phpmyadmin and you can't figure out what it all means, stop now.

3) BACKUP YOUR WORDPRESS DATABASE. Can't stress that enough.

4) Export your keyword info from the MT database. At a minimum you're going to need to grab the keywords AND a piece of unique identifying information so you can tie those keywords back to the correct blog post. Title would be the most obvious choice to me, but I don't remember if MT requires blog titles or not. If it doesn't, you're in trouble; you can't rely on MT's internal post numbering system because it'll obviously be different from WP's internal post numbering system.

5) Translate the mysql dump from MT into a format Ultimate Tag Warrior will understand. Because Ultimate Tag Warrior will likely reference a post ID, you'll have to perform some intermediate steps. You'll need to grab the correct post ID from the Wordpress database by using the title as the key. Once you've got post IDs to go along with your post title, you can drop the title and just import an mysql file into your Ultimate Tag Warrior database that contains keywords attached to Wordpress post IDs.

6) Fire up your blog and see the tag goodness.

The process above is vastly simplified, partially because I don't know the MT database or the UTW database, and partially because explaining it all would be an enormous amount of text (and plus I couldn't guarantee that it would work). All in all, it'll be a fair amount of hackery to get everything working right. Depending on how many posts you have, it may almost be easier to simply re-input the tags manually. (Ugh.)

Good luck.
posted by chrominance at 8:55 AM on August 18, 2006


Response by poster: "Learn MySQL" is a non-trivial step.

Since I've only imported a few test entries into the existing WP interface, there's really nothing to worry about destroying, since I'll be starting from scratch. What I'd really like to do is alter the MT import script to respect the Keywords field (or update the older edit of the MT import script that did so).

I've been blogging since 2001, so importing the tags manually is kind of a non-starter.
posted by adamrice at 9:33 AM on August 18, 2006


Movable Type doesn't require titles.
posted by kirkaracha at 10:14 AM on August 18, 2006


« Older Pinched in the cervix by the doc = weird mood...   |   Why do airlines give the same flight number to... Newer »
This thread is closed to new comments.