Upgrading Drupal 4.7 to 5.18

Bassplaying.com runs on Drupal.  For a long while now, we’ve been on version 4.7.  Drupal is on version 6 now (and 7 is in the works).  The support the current version and one previous version, so it was high time to get up to version 5, at least, with an eye toward version 6.  The problem with upgrading is two fold:  1) it’s a time-consuming, meticulous task, and 2) we use a lot of contributed modules to provide functionality beyond what is included in the standard Drupal distribution.  It can take a while for the independent developers of those modules to upgrade them to work with new versions of Drupal.  

Still, we were falling behind, so I took some time on Friday and upgraded the site.  Now I’m in the middle of tweaking lots of things to take advantage of new features while maintaining some familiarity with the previous version (and, right now, Dreamhost is really slow, and that’s cramping my style).  Here are a few resources that helped me through the upgrade process:

  1. Lullabot has a fine video that covers upgrading from 4.7 to 5.x and is the place to start.  I used one of their videos the last time I upgraded bassplaying.com (from 4.6 to 4.7).  
  2. I had a weird error which was caused by some old Google AdSense code (in the database) calling a function that, in version 5, has been renamed.  This guy’s page saved me on that one.  
  3. One weakness of the Lullabot videos is they only demonstrate using phpMyAdmin for backing up your Drupal database (prior to upgrading).  But any Drupal site that’s been active for a while will likely have a database too large for backing up with phpMyAdmin.  You have go with the command line.  These excellent command-line backup and restore scripts make doing database backups quick and easy.  These are what I used to back mine up before I did the upgrade.  And I’ve installed them in my new Drupal site, so I’ll can get in the habit of doing DB backups more regularly.  

So, all in all, it was time consuming but nothing went grossly wrong.  There’s a lot of post-upgrade twiddling to do, but that’s sort of fun, really.  And I’ve already found a few new modules that I can’t wait to deploy.