Drupal - Drush command to download AND enable a module

The following will download and enable the module:

drush en module_name -y

Edit: The download (dl) command is not needed. When trying to enable a module that is not downloaded yet, Drush will ask if you want to download it and then ask if you want to enable it. The -y automates the "yes" answers to these questions.

This was added in Drush 6.0.0 (#1364814 by eiriksm, jonhattan: Added Extend pm-enable to offer downloading the project for missing extensions.)


drush dl module_name && drush en module_name -y

Downloading and enabling a module can be done with drush en project_name. It asks for a confirmation; if you don't want to confirm, use the -y parameter.

drush en project_name -y

You can download more projects with the same command.

drush en rules views token -y

For a list of some basic Drush commands see Basics drush commands.

Tags:

Drush