Skip to main content
Webhaven

Main navigation

  • Home
  • Who it's for
    • For Experts
    • For Agencies
    • For Starters
  • ROI calculator
  • Docs
  • Get launch notified
Just launched the Webhaven demo website. Check it out! 🚀

Breadcrumb

  1. Home
  2. Webhaven documentation
  3. Handy resources
  4. Useful Drush commands

Documentation

  • Documentation
    • Welcome
  • Get started
    • What is Webhaven?
    • Installation
  • Configuration
    • Drupal Canvas
    • Site settings
  • Theming
    • Introduction
    • Theme structure
    • Create a custom theme
    • Single Directory Components (SDC)
    • Component structure
    • An example component
  • Handy resources
    • Roadmap
    • What are Drupal recipes?
    • What is a Drupal site template?
    • What is Drupal Canvas?
    • Drupal Canvas vs Layout Builder vs Paragraphs
    • What is DDEV?
    • Useful DDEV commands
    • What is Drush?
    • Useful Drush commands

Useful Drush commands

Drush is the command line shell and scripting tool for Drupal.

A cheat sheet of the Drush commands I reach for most to manage cache, configuration, database updates, modules, users and cron.

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 cr

Configuration commands

A list of Drush configuration commands that I often use.

Export the current site configuration with:

drush cex

Import configuration from your sync directory with:

drush cim

Show the differences between active and staged configuration with:

drush config:status

Read a single configuration value with:

drush config:get system.site name

Set 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 updb

Run the full deploy routine (database updates, config import, and cache rebuild) with:

drush deploy

Module and theme commands

A list of Drush module and theme commands that I often use.

Enable a module with:

drush en module_name

Uninstall a module with:

drush pmu module_name

Enable a theme with:

drush theme:enable theme_name

User commands

A list of Drush user commands that I often use.

Generate a one-time login link for the admin user with:

drush uli

Reset a user's password with:

drush user:password username "new-password"

Block a user with:

drush user:block username

Cron and queue commands

A list of Drush cron and queue commands that I often use.

Run cron manually with:

drush cron

Process a queue with:

drush queue:run queue_name

Site information commands

A list of Drush commands to inspect your site.

Show the status of your Drupal site with:

drush status

List all available Drush commands with:

drush list

Maintenance 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 1

Take the site back out of maintenance mode with:

drush state:set system.maintenance_mode 0

You've seen how it works. Now see what it's worth.

See how much time and money Webhaven saves on every Drupal project.
Calculate my savings
Webhaven
Ship your best Drupal work, faster.

Links

  • Who it's for
  • Get launch notified
  • Docs
  • Free tools
  • Blog
  • Get in touch

Follow on

  • drupal profile
  • linkedin profile
  • x_twitter profile
© 2026 Webhaven.
All rights reserved.

Legal

  • Privacy policy
  • Terms of service
  • Accessibility
  • Login
Built with