Updating Drupal modules using Drush

May 20, 2010 - by Ian Hasell

One of the features that Qdos provide when hosting a Drupal site with us is that we will perform security updates on your behalf. This alongside out stringent backup policy means all bases are covered in looking after your content. If you are not lucky enough to be hosting with us you can follow the same steps we do to keep things nice and secure.

Drush is a command line shell and Unix scripting interface for Drupal.  Once Drush is installed you can run the following code to update a single module. Please backup your database first!

drush dl <module name1> <module name2>
drush updb

The code above overwrites the files in your module folder with the new ones then performs any updates to the database.

The reason for doing it this way rather than using

drush up

is that you don't update all the modules to their latest version . You may be happy running an old version of a module,  their can incompatibility issue between modules or you don't have the time to do a full regression test on the site. The method outlined above is a  way that  allows you to keep your Drupal site secure.