Friday, July 16, 2010

Updating Drupal Module

With changes to the core modules or due to security / bug fixes / patches, installed modules may require to be updated. Updating (contributed) modules is very simple as the process has been kept very rudimentary. Here are the steps needed to update a module:
  1. Find modules requiring updates
  2. Disable the module
  3. Delete all files of the module
  4. Reinstall the updated module
  5. Run update.php script

Now lets delve into each of the above steps in a bit of detail:

1. Find modules requiring updates
If you do not already have the Update Status module installed & enabled, get it from the drupal site http://drupal.org/project/update_status & install it. This module tracks which of the installed modules have updates available and provides handy links to download the updates directly. Once this is installed & enabled, go to Administer > Reports > Available updates or the Drupal path admin/reports/updates. This page shows which modules require updates to be installed.

2. Dsiable the module
Once the list of modules to be updated is known, go to Administer > Site building > Modules or the Drupal path admin/build/modules and disable those modules.

3. Delete all files of the module
Now delete all the files for these modules by deleting their corresponding folder in sites/all/modules folder in your Drupal install.

4. Reinstall the updated module
Now upload & install the files for the updated module just as if it were a new module. For details on how to install a new module, check out my blog post on Installing Drupal Module.

5. Run update.php script
Drupal provides a special update script located in the root folder of the install for maintaining the database after upgrades. Log in to the admin section with your admin id(usually having id of 1 and is the first account to be creaed). Then point your browser to http:///update.php and click on the Update button. The modules requiring database updates will have their appropriate DB update number selected in their drop-downs. For most cases, the defaults should be fine. The database update may take some time depending on the number of updates to apply - once this is done, the modules are all updated!

1 comment:

Wilson Wedloc said...

I am looking and installing modules for my site and came across your post. This is perfect. Thanks for sharing the good information. This will really help me a lot.

LinkWithin

Related Posts Plugin for WordPress, Blogger...