maintenance

Keeping Drupal up to date

Drupal depends heavily on contributed modules to implement a lot of it's functionality. One of the benefits of this is that the system is very modular and it's easy to configure the proper set of functionality. On the down side, this can lead to module creep, where you install lots of modules that you don't "really" need because they do something cool. Among other things this can make keeping up with new module releases a pain.

Lately, I've been addressing this problem with a combination of drush and update_status. Drush is available for both Drupal 5 and 6, and update_status is a contrib module in 5, and in core for 6.

It's pretty straightforward. Update_status gives you an admin page (and can also notify you via email) displaying which modules you have installed, and if any of them have updates available, especially security fixes. Drush, on the other hand, is a command line interface to the Drupal system that allows you to manage packages from the command line (similar to apt-get on a Debian Linux system), run database queries, and other maintenance tasks (cloning database and directory trees, etc).

I install drush into sites/all/modules on a Drupal site and enable it in the system, including the Package Management, wget, SQL support, and toolbox modules.

Then, from the site root, one can run UNIX shell commands such as


php sites/all/modules/drush/drush.php pm update og

This particular example updates the organic groups module, which the update status page has informed me is out of date. Once I've updated the module, I run /update.php to apply any necessary database schema changes.

And that's pretty much it. I'd like to see automatic application of schema changes and automated rollback (so that updates are an atomic operation), and so on, but so far it has seriously reduced the overhead of bringing sites up to date. These two modules are the first that I add to any new projects I'm working on.

Cross posting

I've set things up so that posts that I create here register over at Jastef.net as well.

I'm not sure I've got it right yet, so there may be some tweaking before it's actually working properly.

The Emperor is most displeased with your apparent lack of progress

128547002_f85c05c2bb.jpg

I decided that this site needed a bit of attention - the theme bugged me a bit and I've let it go for pretty much ever. With my new job and consequent shifts in attention, I've started having a bunch of topics that were worth blogging about dance through my mind, and I figured that having a facelift and a couple new features added to the site might make me more willing to spend some time bringing the content up to date and making it worth visiting again :) I'm going to see what I can do about getting my posts here cross posted to jastef.net so that more people see them. I'm not done with my template changes or my content changes, so there will continue to be fiddling over the next few days/weeks.