I was contemplating building a quick bash script to wget all of the modules I use on Drupal sites but every time the module version changes, the link changes.

Take for example the views module. At the time of writing it's at version 7.x-3.0-rc3 and therefore the link is as such http://ftp.drupal.org/files/projects/views-7.x-3.0-rc3.tar.gz

If I were to add this to my bash script it'd obviously stop working as soon as the next version is released.

Is there a URL which I can use with wget which will always give me the latest non dev version of a Drupal module.

[...]drupal.org/projects/views-7.x-stable.tar.gz for example

I don't want to use GIT or CVS etc as this will mean anyone using the script will need to install said program first. I would just like to be able to pass this script around to developers in my office to quickly download and deploy the latest Drupal version and modules we use constantly.

2 Answers 2


The latest stable is published on an XML file, so your script would need to query and parse it to get the proper URL. http://updates.drupal.org/release-history/project-list/all this returns ALL the projects release history, obviously very large. You can get a specific project with this URL http://updates.drupal.org/release-history/views/7.x where "views" is the project name and "7.x" is the version.

Or you could just use DRUSH. It's super easy to install and will make your life 100x easier and better. Drush is a command line PHP script that allows you to simply type things like drush dl views or drush up views. It can do a lot more too, it's truly amazing. http://drupal.org/project/drush

  • 5
    +1 for Drush. Why bother writing your own bash scripts if others have already done it? Nov 21, 2011 at 16:05
  • I'd looked into Drush, but again, it's installing something. Ideally I just wanted a quick bash file full of wget commands and tar extract commands so that I don't have to roll out Drush onto client machines and development servers. If the xml file is the only list it's not worth me parsing it I guess. Drush may end up being my quickest option after all. Nov 21, 2011 at 16:18
  • 2
    I can't image not having drush on both development and deployed instances.
    – mpdonadio
    Nov 21, 2011 at 16:35
  • 2
    I think if you used Drush a few times you'd drop your resistance mighty quickly. Most of us can't live without it. Also, you don't really "install" Drush, you just download it and make a link to it. WGET the drush URL, and then ln -s to it the folder. Nov 21, 2011 at 18:29
  • Drush for President. May 1, 2013 at 14:48

Dave Hall has a blog post on this very subject, with excellent example code, at http://davehall.com.au/blog/dave/2010/02/22/check-drupal-module-status-using-bash

  • 2
    Normally, answers with litte more than links aren't considered good ones on Drupal Answers. Can you summarize the linked article?
    – mpdonadio
    May 1, 2013 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.