Wednesday, October 10, 2012

Batch update modules or themes of Drupal 6/7 in command line

To update Drupal modules, you need to download manually all modules and this can quickly become tedious. Especially if you have multiple modules and Drupal installations.

I wrote a simple script that parse the module's page and install or update the most up-to-date version.

This works for themes as well. To use it, simply go into a modules or themes folder and run one of the tool.

Valid folders are:
  • /modules
  • /themes
  • /sites/all/modules
  • /sites/all/themes
  • /sites/*/modules
  • /sites/*/themes
However, not that you should not try to update root folders, they are reserved for core modules and are updated with Drupal. will install or update one module, will batch update all modules in current folder.


  1. It's nice man!

    But I have to suggest you to take a look at Drush ( You can do a bunch o things on command line with it. You can, for example, update modules and themes just running the "drush up" command.


  2. Wow, I can’t believe I missed that, this is exactly what I was looking for when I scripted my little tool.