I’ve been thinking about switching from Drupal to WordPress (or perhaps I should say switching BACK since originally this blog was a WordPress blog) for a while now. I think think one of the driving factors was the WPtouch plugin, written by Duane and Dale of BraveNewCode, which basically automatically themes your site for optimal viewing on iPhones, iPod Touches, and Android devices. It really is awesome – if you’re running a WP blog and you don’t have this plugin installed – go install it now! With these guys writing cool plugins (another one I like is the Earth Hour plugin) I figured now was the time to bite the bullet and make the switch, afterall – I can always switch back if it doesn’t work out for me right? :) Note that I have absolutely nothing against Drupal, I just think that WordPress seems to fit my needs a bit better.
To get started, naturally I hit up Google to see who had done this before and see if there was an easy one button press type solution out there already. While I didn’t quite find the one button solution, I did find some good resources. In the end, I pretty much followed this guys instructions word for word and things worked out well. There was a bit of cleanup needed, but for the most part everything looked pretty good. Some things to note: I was converting from Drupal 6.13 to WordPress 2.8.4 (the latest at the current time); my Drupal site was basically a one user blog, and the conversion mentioned above doesn’t covert user accounts – so you’ll have to do that manually.
Here is some of the cleanup that I had to do post conversion:
- I used pathauto to automatically generate permalinks in Drupal, so I used this file to help get my wordpress links to match up with links pathauto created
- even after using the above script, I still had a bunch of links that were ending in “-” which I had to find and clean up manually (turns out I use the ellipsis a lot in post titles)
- ideally I’d like to set something up to redirect old Drupal /node/# links to the appropriate WP post but in the meantime I’ve used the Redirection plugin to redirect specific links that I know were in use
- I seem to have lost comment titles – in Drupal you have the option to enter a title for each comment, these were lost in the conversion, I’ll probably manually move these over eventually
I think that was about it. I did the conversion nearly two weeks ago now and was unfortunately busy immediately afterwards so I didn’t get around to writing this up until now. One other thing I’d like to mention is the plugins that I’m currently using – these replaced drupal modules with similar functionality obviously.
- Askimet – using this to replace Mollom – essentially a comment spam plugin
- Earth Hour – “turns off” your blog during Earth Hour
- FD Feedburner – plugin for redirecting default WP RSS feeds to your feedburner feeds
- Flickr RSS – get your latest Flickr Photos and display them
- Google Analytics for WordPress – track your stats
- Google XML Sitemaps – submits your sitemap to Google (and others) when you update your site
- MyOpenID – use your site as your OpenID
- Redirection – redirect old links to the proper URL
- WordPress.com Stats – similar to Google Analytics, but slightly different data
- WordTwit – tweet your posts out to Twitter – another excellent plugin by BraveNewCode
- WPtouch – make your site usable (and look great) on mobile devices
EDIT: I’ve just replaced Akimet with Mollom, after realizing that there was a WordPress plugin available for it.
UPDATE: Just found something else that I had to fix. In the wp_comment table, there are two fields for the comment date: comment_date and comment_date_gmt. During the conversion, the comment_date field was populated, but the comment_date_gmt was left at the default value of 0000-00-00 00:00:00 for all comments. It seems this is the field that is used to determine sort order for displayed comments, so I had to fill it in. Since my timezone is 4 hours behind GMT (during DST, 5 hours otherwise) I just used the MySQL addtime() function to simply add 4 (or 5) hours to the comment_date value and store it in the comment_date_gmt field.