Using Drush

Learning to use Drush can really speed up your development and management of Drupal sites.

Help

Running drush will give you a list of commands.

drush help COMMAND will give you help on that command.

Clear cache

drush cr

Manage Modules

List modules

drush pml

Enable module

drush en admin_toolbar_tools

Disable module

drush pmu admin_toolbar_tools

Delete content type

drush entity:delete node --bundle=slideshow

https://www.drush.org/12.x/commands/entity_delete/

Delete field

drush field:delete node --field-name=comments

https://www.drush.org/12.x/commands/field_delete/

Install Drush

Drush is downloaded with composer as a project dependency.

composer require drush/drush

Test it by typing drush.

Drush Launcher

https://github.com/drush-ops/drush-launcher

Tags