Installing and updating Drupal with CVS

It’s relatively easy to use CVS to keep Drupal core up to date. Here’s a quick guide.

To install core:

$ cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal co -r DRUPAL-6-14 -d directory_name drupal

When doing the above, change 6-14 to the Drupal version you want to check out (obviously using X-X syntax instead of X.X), and change directory_name to the path to the directory where you want it to download.

When it comes time to update, navigate to the site root and run:

$ cvs update -dP -r DRUPAL-6-15

Just change 6-15 to the version you’re updating to.

And of course, don’t forget to run your site’s update.php after these updates are done to keep your database in the game.

Bonus tip: since we all tend to do updates more than we do installs, I added this to my .bashrc file:

alias drupdate="cvs update -dP -r"

(Make sure that after you edit the file, you run bash so that it gets loaded.)

With this alias, you can navigate to your site root (assuming it’s already running off of CVS), and update it using a simple;

$ drupdate DRUPAL-6-15