Working in DDEV
When you run Drush inside a DDEV project, prefix every command with ddev, for example ddev drush cr. The commands below use plain drush so they work in any environment.
Cache commands
The Drush cache command I use most.
Clear and rebuild all caches with:
drush crConfiguration commands
A list of Drush configuration commands that I often use.
Export the current site configuration with:
drush cexImport configuration from your sync directory with:
drush cimShow the differences between active and staged configuration with:
drush config:statusRead a single configuration value with:
drush config:get system.site nameSet a single configuration value with:
drush config:set system.site name "My site"Database and deployment commands
A list of Drush commands I run after a code or config change.
Run pending database updates with:
drush updbRun the full deploy routine (database updates, config import, and cache rebuild) with:
drush deployModule and theme commands
A list of Drush module and theme commands that I often use.
Enable a module with:
drush en module_nameUninstall a module with:
drush pmu module_nameEnable a theme with:
drush theme:enable theme_nameUser commands
A list of Drush user commands that I often use.
Generate a one-time login link for the admin user with:
drush uliReset a user's password with:
drush user:password username "new-password"Block a user with:
drush user:block usernameCron and queue commands
A list of Drush cron and queue commands that I often use.
Run cron manually with:
drush cronProcess a queue with:
drush queue:run queue_nameSite information commands
A list of Drush commands to inspect your site.
Show the status of your Drupal site with:
drush statusList all available Drush commands with:
drush listMaintenance mode commands
A list of Drush commands to take your site offline for maintenance.
Put the site into maintenance mode with:
drush state:set system.maintenance_mode 1Take the site back out of maintenance mode with:
drush state:set system.maintenance_mode 0