Thursday, May 20, 2004

WordPress

This blog now runs on WordPress. It was surprisingly easy to install, and the Movable Type importer worked well except that it didn’t fill in the post_date_gmt column. My Movable Type permalinks were of the form:

<$MTArchiveDate format="%Y/%m/%d/"$><$MTEntryTitle dirify="1" trim_to="25"$>.html

This translates to:

/%year%/%monthnum%/%day%/%postname%/

in WordPress. The differences are that WordPress uses hyphens instead of underscores and that it doesn’t trim the title to 25 characters. So, to keep my old permlinks working, I changed the WordPress slugs for the imported posts to the Movable Type format:

UPDATE wp_posts SET post_name = SUBSTRING(REPLACE(post_name, '-', '_'), 1, 25)

I also changed line 183 of wp-blog-header.php to make it not delete underscores from the slug in the URL:

$name = preg_replace('/[^_a-z0-9-]/', '', $name);

Finally, after some mod_rewrite fun, all the links from Movable Type should still be valid, and they should permanent-redirect to the new, cruft-free URLs.

For the record, I think Six Apart makes a good product. I’m not upset by their price increases, nor have I been itching for something under the GPL. I simply prefer WordPress.

1 Comment RSS · Twitter


Welcome to WordPress! I don't represent them, but am a fan and a switcher of about a month or so. Been a great change!

Leave a Comment