Chapter 9. Installing Drush

Drush is the Drupal shell, a robust and mighty library of commands that are designed to make your life easier in Drupal. Among the many things you can do with Drush, some of the most exciting commands (from a designer/site builder’s standpoint) are:

drush dl [module_name]

This lets you download any module from Drupal.org. You can even download a string of modules by separating the machine names of the modules (i.e., the words that go after drupal.org/project/ in the module’s URL) with spaces.

drush en [module_name]

This lets you enable any of the modules you just downloaded. Like dl, you can enable a string of modules by typing a space-separated list.

drush up

This is my single favorite thing to use Drush for, and the reason that you, dear reader, must learn Drush. With this simple command, you can update all your modules and Drupal core in about five minutes, as opposed to the—ahem—considerably longer amount of time it takes to do it manually.

If you’d like to see a demonstration of the merits of using Drush versus installing modules manually, check out the video “More Beer, Less Effort” from Development Seed:

http://developmentseed.org/blog/2009/jun/19/drush-more-beer-less-effort/

Synopsis: installing a site and a pile of modules via Drush versus manually left our hero with an extra hour or more of time on his hands—plenty of time to celebrate with a refreshing beverage.

Installing Drush

Grab the Drush package from http://drupal.org/project/drush. You want to ...

Get Drupal for Designers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.