The Drupal Shell - Drush

The Drupal Shell is an amazing tool if you maintain Drupal web sites and you have shell access to the server, where the Drupal site is hosted. This is also an unvaluable tool if you develop i in Drupal.

Drush 8

Updating drush: composer global update drush/drush

Manual install:

Check latest drush version:

Example procedure:

chmod +x drush.phar
nano .bashrc 
alias drush='php ~/drush.phar'
source .bashrc

Useful Commands

drush pml --no-core --type=module --status=enabled --pipe | grep webform

drush pml --no-core --type=module --status=enabled --pipe | grep -o -P '(?<=\().*(?=\))'

drush pml --no-core --type=module --status=enabled --pipe | grep -o -P '(?<=\().*(?=\))' | xargs

Drupal 8 disable all non core modules also called extensions: drush pml --no-core --type=module --status=enabled --pipe | grep -o -P '(?<=\().*(?=\))' | xargs drush pmu


Last modified