Post

Drush cheatsheet

Get version of Drupal and PHP you are running.

1
drush status

List installed modules

1
drush pm:list --status=enabled

Remove flag to get all installed modules, regardless of status

Enable Module

1
ddev drush en paragraphs 

List Themes

1
drush pm-list --type=theme

Enable Theme

1
ddev drush theme-enable bootstrap5

Set theme as default

1
2
ddev drush cset system.theme default bootstrap5 --yes
ddev drush cr
1
cd /your/drupal/site/
1
drush uli --uri example.com

Trouble Shooting

The Drush launcher could not find a local Drush in your Drupal site.

1
vendor/bin/drush uli --uri http://your-site-url

Find Drush version

1
drush --version

Update Drush

You might need to add the ^ to the beginning of the version number ie ^12.0.2 in the composer.json file.

1
composer update drush/drush
This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.