Switch from Drupal to Wordpress

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.

7 comments to Switch from Drupal to WordPress

  • Install Gravatar… and probably best to try to merge the titles into your comments than do it manually – you’ll never ever get around to doing it that way.

    When I did my migration to movable type a long time ago, I never ended up filling in the old comments because I was going to do it manually….

  • Gravatar support is installed out-of-the-box with WordPress Dave. You’ll notice your smiling mug is looking back at you now that I’ve approved your comment. :)

  • Wait, Gravatar must be built in… cause you’re using it. Shows you what I know about WP.

  • So just now I’ve installed the Mollom plugin – which I had forgotten was available for WordPress. I deactivated the Askimet plugin since I’m not sure if they can work together or not. The beauty of Mollom is that I shouldn’t have to do *anything* – including deleting comments that have been automatically marked as spam, whereas with Askimet I still had to do that step. We’ll see how it goes.

  • Great post, I’m building up a blog site now and had started it with Drupal, but now switching to WordPress. Drupal has been a great tool for other CMS sites, but not so good for a one-person blog, and the themes are so much nicer for WordPress.

  • Hey Kevin glad to see you made use of my tutorial :) it’s always great to see others using and expanding on the knowledge we share with each other through blogging, Great work and hoe the new WordPress System works out for you. :)

  • For those that need more updated instructions, an open source Java program that performs a Drupal 6 to WordPress 3 migration can be found here

    If you are not an expect, you may want take a look at this web for a cheap and automatic migration service

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>