University of Oregon

Drush enable all inactive modules

I’ve been using make files a lot lately and when ever I’m ready to release an updated file I like to verify that all the project versions are up to date.
To leverage Drupal’s update functionality each project needs to be enabled. So I typically generate a new site from the make file and enable all the projects with drush. The key to that is the combination of commands:

drush en `drush pm-list --status="disabled,not installed" --pipe`

Here I’m enabling a list of module; specifically drush’s list of disabled and not installed modules.

drush pm-list --status="disabled,not installed"

That code gets you part of the way there. The addition of this:


makes it a script-able list. Then when I surround that with back-ticks and feed it to

drush en `...`

I’m in business. (more…)

Drush Make post processing – Adding module type

We’re using drush make files to keep our Drupal sites updated.
Aegir will build a platform (base install for a multisite) from a make file. I believe it also re-builds the platform from that makeFile each time the platform is verified.

This is pretty handy but requires some leg work up front to generate the makeFile. is the go-to site to get a fresh makeFile built.
Though I just looked at the drush help file and saw that there’s a drush make-generate command ($ drush make-generate myMakeFile.make) that

Attempts to generate a makefile from the current Drupal install, specifying project version numbers unless not known or otherwise specified. Unversioned projects will be interpreted later by drush make as “most recent stable release”

So I gave it a shot and it did a great job.