9th Oct, 2007

3 Comments

Switched From MovableType to WordPress

I just moved my blog from MovableType to WordPress so you might notice some weirdness in the RSS feed. I haven’t gotten around to porting the design yet.

The port was relatively easy. I exported using MT’s export feature and imported using WP’s import feature. The main hurdle was getting the permalinks to work.

First I had to setup redirects. Here’s what that looked like in lighttpd:


url.redirect = ("^/archives/(.*).html" => "http://stubbleblog.com/index.php/$1",
"^/archives/(.*)/$" => "http://stubbleblog.com/index.php/category/$1/",
"^/index.rdf" => "http://stubbleblog.com/index.php?feed=rdf",
"^/index.rss" => "http://stubbleblog.com/index.php?feed=rss",
"^/index.xml" => "http://stubbleblog.com/index.php?feed=rss2")

Unfortunately, WP’s import doesn’t keep MT’s post name. Truncating does the trick for most:

UPDATE wp_posts SET post_name=SUBSTRING(post_name,1,15)

But that leaves some post_names with trailing dashes and doesn’t account for cases in MT with incremented post names. I had to fix those manually.

Related Posts:

3 Comments

Add your own comment below

  • Welcome.

  • Full text feed would be nice :)

  • You can use the following query to automatically get rid of the underscores at the end of the post name (mine reflects a cut off of 30 characters in the MT post name, hence the 29, I think):

    UPDATE wp_posts SET post_name = SUBSTRING( post_name, 1, 29 ) WHERE RIGHT( post_name, 1 ) = ‘_’

Leave a Reply