July 25, 2012 - Comments Off on Drush de Jour: Module machinations

Drush de Jour: Module machinations

If you are running one Drupal site, or multiple sites, or multiple muiti-site installations, you will at some point be wrangling modules. Drush can help you list, install, and uninstall modules.

% drush pml

If you want to see a specific module you can filter the result through grep.

%drush pml | grep <pattern>

e.g., %drush pml | grep token will show you modules with 'token' in the name.

 

You can also install, enable and disable modules if you need to debug or test.

Download a module:

%drush dl <module name>

 

Enable the module:

%drush en <module name>

 

Disable the module

%drush dis <module name>

 

If you need to fully uninstall a module, which will also run any hook_uninstall() in a module which can be handy for debugging.

Uninstall the module:

%drush pm-uninstall <module name>

 

You can script these commands as well with aliases, allowing you to enable/disable modules across multiple sites.

The Drush de Jour brings you the latest and possibly greatest bits of drush wisdom we use for developing and maintaining our Drupal sites.

Published by: chazcheadle in The Programming Mechanism
Tags:

Comments are closed.