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:
- 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).
- 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.
- 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.
So I’ll remember it for next time, there’s an additional step for users of Google Analytics. That is to edit page.tpl.php in the themes directory for each theme you use and place the Google Analytics code block before the closing body tag.
I also use page.tpl.php to for custom Google AdSense placements. You can place them via the Advertisement block, but where it can place one is fairly limited. I put mine right below this line (using the Garland theme as an example):
That puts it in a handy spot right above the content on any page. I use the 468 x 60 banner, as most of my visitors run their monitors at 1024 x 768. That width spans the middle of my three columns w/o any layout issues. It’s a little narrower than my middle column, so I drop it inside a paragraph tag with the align=”center” attribute (’cause I’m old-school like that).