Converting to WordPress
Nov 19th, 2006 by Alex
I’d been considering converting to WordPress (from Movable Type) for some time now, but hadn’t had the opportunity to do so. While the majority of things are moved over, I’m not out of the woods yet. Some things are still very broken.
Why I Did It
I had a few reasons for upgrading:
- I wanted the ability to tweak the code. I know PHP. MovableType is written in Perl. My Perl abilities are, in a word, bad.
- Since day one I haven’t allowed comments for fear of comment spam. The version of MT that I was using had awful (read: no) spam filtering capabilities out of the box.
- Newer versions of MT that provide spam comment filtering/appoval capabilities costs money. Screw that.
- I wanted to change things around.
- I’m a geek.
The Process, Briefly
I started with the Importing from Movable Type guide on Codex. For the most part, this was incredibly smooth.
I did end up preserving the entry numbers from my MT install. One note on that, though. You might receive a “Cannot redeclare class mt_import” error if you follow the directions. When WordPress runs the import, it tries to initialize all files in the directory. This includes your backup copy. Move the old mtORIG.php (that you just renamed) out of the import directory. After I did that, things were very smooth.
I used the zeroise tweak as well.
I choose a clean theme and tweaked to include an AdSense banner. I took a fair bit of time to fish the colors out of the theme stylesheet so that it wouldn’t be jarring. I still want to get a new graphic, instead of using the stock image.
Preserving the Permalinks, or not…
Despite messing with my global Apache configuration to allow overrides and various options, none of the suggested .htaccess tweaks worked. Go figure. I had to put the following line in my virtual host configuration for the per-entry permalinks to be rewritten. It wouldn’t work in the .htaccess file.
RewriteRule ^/tm/archives/0(.*).php /tm/index.php?p=$1 [R]
This works for my numbered entries. The category archives (previously /archives/cat_name.php) refuse to be rewritten to /archives/category/name. Ditto with the monthly archives (previously /archives/2006_11.php). My listings in Google will be screwy for a while. Bummer for the folks attempting to find the recipe for MegaFries or my venting about why MySpace sucks (which are the primary hits from Google). Oh well, I give up for tonight.
Still to do…
I need to go back and enable commenting and trackback pings for all of my old entries. I probably ought to edit the “not found” dialog for those poor people coming in from Google.