Insufficiently Random

The lonely musings of a loosely connected software developer.

Wednesday, January 11, 2006

Switching to WordPress

So i just spent a few hours converting my blog (if it could even be called that!) from MovableType to WordPress. It was pretty easy but still a lot more painful than it should have been.

The main blog content went over pretty quickly, however I did have to patch the MT export and the WP import to pass my old URLs into WordPress so the WordPress article slugs for all old content would match the old MT names. This let me keep all of my older content at the same URL. Since I know PHP pretty well this turned out to be quite easy to do.

My photo album was another story entirely. I wound up just giving up and republishing all images through Photon again, losing all of my old URLs. So a couple of quick Apache mod_rewrite rules got added to my .htaccess file to redirect people back to the right album, but not to the direct image. I also had to change all of my image URLs, so if anyone was linking directly to a full image or its thumbnail those are all broken. But I doubt anyone was really doing that.

Why did I convert to WordPress? Mainly because its open-source, but secondly because it doesn't have to rebuild the static HTML everytime something is changed. I got tired of the MovableType rebuild process whenever I posted content. WordPress doesn't have to rebuild static page files when things change, as it generates everything during each page request. Sure it might be slightly slower but my traffic is so low that it doesn't really matter that much. Plus although I'm personally not a big fan of PHP the WordPress templates are significantly easier to edit and work with than the MovableType templates are.

But WordPress 2.0 isn't without issues:

  • The MT importer throws away excerpt text because a PHP variable was named $excerpt rather than $post_excerpt. Like I said, PHP isn't the best language. A better language would have caught this bug during parsing/compilation.

  • I don't think that %category% works in permalink URL patterns, despite the documentation stating that it is permissible. I tried using it in my photo blog (spent a few hours on it actually) and eventually went to /%year%/%monthnum%/%postname%.html because WordPress wasn't showing single posts when it was /%category%/%postname%.html.

  • Since I had two blogs installed I wanted only one copy of WordPress on the server (easier to maintain/upgrade). This turned out to be a nightmare when it came to my photo blog. It was fairly easy to setup my wp-config.php file to select which table prefix should be used based on the entry URL, but it was actually rather difficult to get file upload via XMLRPC working properly for Photon. WordPress' file upload code has some bugs and doesn't really allow you to define the UPLOADS constant to be anywhere except within the WordPress software directory; something I didn't want. (Hint to developers: Its never a good idea to modify stuff in the software directory!)

0 comments :

Post a Comment