Migrate your Typo blog to Wordpress

There are some scripts available, but I never found a step-by-step set of instructions for how to migrate my Typo 4.0 blog to Wordpress 2.0. This post documents what I did to transfer my blog from one platform to the other.

Install Wordpress

I am now running my Wordpress blog on Dreamhost. I used my own instructions on how to set this up with Capistrano

I took this opportunity to switch themes too!

Add the Ultimate Tag Warrior plugin

To get tag functionality in Wordpress, I added the Ultimate Tag Warrior plugin I still need to add code to show the tags in posts, but the underlying data is there.

Save the Typo database

On my Typo server dumped the MySQL database using mysqldump.

Import the Typo database into Wordpress database

On my Dreamhost account, this is as simple as running mysql -u [user] -p < typo-dump-file

Run the migration script

Stuart Johnson has a Typo to Wordpress migration script that almost worked for me. I had a problem with the post content not showing up. I simplified the SQL for this step, as I didn’t have the pre-generated HTML or the extended pieces. I just copied the existing content field directly over to Wordpress.

This script sets up the permalinks for the posts in the database.

In Admin, save the permalink configuration

To activate the permalink structure, you need to go to the Wordpress options > permalinks and just click Save. This updates the .htaccess file with the redirects.

Approve all the comments

All the comments seem to come into Wordpress needing moderation. In lieu of changing the migration script, I just approved them all and dealt with an email for each going to my mailbox!

Note: It looks like the Typo 2.6 comment text isn’t being imported correctly.

Install Textile wrapper plugin

I use Textile for my Typo posts, so I needed this Wordpress plugin

Install GeSHi wrapper plugin

From the same place as the textile plugin, I installed the GeSHi wrapper to do my code tags. Note that, as of this writing, I still need to go through the DB and change my typo:code tags to the appropriate code tag.

Add the /articles/tags/foo rewrite to .htaccess

I’m trying to setup the rewrite rules to allow the /articles/tags/foo urls to work, but this has been problematic so far!

Update DNS or switch out the directories

Since I switched servers, I updated my DNS to point at the new location and waited until my site was switched.

Update Feedburner

I use Steve Smith’s Feedburner plugin. Feedburner will fail to change its configuration if the new url doesn’t exist, so you have to wait for the DNS changes to propogate before you can update your Feedburner configuration.

Cleanup the database

The Wordpress database is left with a bunch of unused Typo tables that need to be deleted. Dreamhost has phpMyAdmin that helps with this. Anything without a wp_ prefix should be removable.

Update!

Forgot to mention this, but I changed the upload directory for Wordpress from wp-content/uploads to files to match Typo and moved the files over from the Typo server.

This entry was posted on Fri, 12 Jan 2007 04:41:29 GMT . You can follow any any response to this entry through the Atom feed. You can leave a comment or a trackback from your own site.
Tags


Trackbacks

Use the following link to trackback from your own site:
http://blog.craz8.com/trackbacks?article_id=migrate-your-typo-blog-to-wordpress&day=11&month=01&year=2007

Comments

Leave a response

  1. Andy C. 7 days later:

    What exactly did you change to the import script? Everyone alludes to your changes but no one has gone and just shown the diff.

  2. tom 7 days later:

    Here’s the original line:

    INSERT INTO wp_posts (post_author,post_title,post_content, post_name, post_date, post_date_gmt,post_modified,post_modified_gmt, post_status, ping_status, comment_status) SELECT 1, title, concat(CASE body_html WHEN '' THEN IFNULL(body,'') ELSE IFNULL(body_html,'') END, CASE extended_html WHEN '' THEN IFNULL(extended,'') ELSE IFNULL(extended_html,'') END), permalink, created_at, created_at, updated_at, updated_at, CASE published WHEN 0 then 'draft' ELSE 'publish' END, CASE allow_pings WHEN 0 then 'closed' ELSE 'open' END, CASE allow_comments WHEN 0 then 'closed' ELSE 'open' END FROM contents WHERE contents.type = 'Article';

    I changed it to:

    INSERT INTO wp_posts (post_author,post_title,post_content, post_name, post_date, post_date_gmt,post_modified,post_modified_gmt, post_status, ping_status, comment_status) SELECT 1, title, body_html, permalink, created_at, created_at, updated_at, updated_at, CASE published WHEN 0 then 'draft' ELSE 'publish' END, CASE allow_pings WHEN 0 then 'closed' ELSE 'open' END, CASE allow_comments WHEN 0 then 'closed' ELSE 'open' END FROM contents WHERE contents.type = 'Article';

    I just took out all the magic for getting the post body, since my blog didn’t use any of the other fields, and the original script didn’t work for me.

  3. Andy C. 8 days later:

    Much appreciated. I started to figure out what you were up to and couldn’t understand what was breaking with the original sql code. However you’re right on by simplifying the field you know has it all & it’ll work like a charm.

    -a

Leave a comment