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 DDEV 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 DDEV commands

A copy-paste reference of DDEV commands for your Webhaven Drupal project. 

Start, stop, restart and delete projects, export and import databases, and run Drush and Composer.

A copy-paste reference of the DDEV commands you need day to day. Jump straight to a task:

  • Webhaven commands
  • Start, stop and restart DDEV
  • Delete or remove a DDEV project
  • Export and import a DDEV database
  • Drush commands
  • Composer commands
  • Disable the DDEV usage statistics prompt

Webhaven commands

Custom DDEV commands that ship with every Webhaven project.

Install a Webhaven project

ddev install

Starts the environment, installs dependencies, unpacks recipes, configures config sync, and opens the site in your browser. Safe to re-run at any time. See the Installation guide for the full walkthrough.

Create a custom theme

ddev create-theme theme_machine_name

Generates a custom theme based on the Webhaven starterkit and sets it as the default theme. See Create a custom theme for building, watching and linting your new theme.

Enable development mode

ddev dev-mode

Disables Drupal caching and CSS/JS aggregation, and enables Twig debug.

Disable development mode

ddev dev-mode disable

Restores default caching, aggregation, and Twig settings.

Start, stop and restart DDEV

Start a project

ddev start

Restart a project

ddev restart

Open the project in your browser

ddev launch

Stop a project

ddev stop

Stops the project's containers without removing the project or its data.

Stop all running DDEV projects

ddev poweroff

Stops every running project at once, including the shared SSH agent and network.

SSH into the web container

ddev ssh

View container logs

ddev logs

Show project information

ddev describe

Delete or remove a DDEV project

None of these commands touch your codebase. Deleting a project removes its containers and database, your files stay where they are.

Delete a project (keeps a database snapshot)

ddev delete

Delete a project without a snapshot

ddev delete --omit-snapshot

Add --yes (or use the shorthand ddev delete -Oy) to skip the confirmation prompt, handy in scripts:

ddev delete --omit-snapshot --yes

Remove a project from the project list

ddev stop --unlist

Hides the project from ddev list without deleting anything. It reappears the next time you start it.

Export and import a DDEV database

Export a database

ddev export-db --file=path/to/db.sql.gz

You can also pipe the dump to a file directly:

ddev export-db > db.sql.gz

Import a database

ddev import-db --file=path/to/db.sql.gz

Older guides use --src; that flag was renamed to --file.

Drop or reset the database

ddev drush sql:drop -y

Empties all tables so you can import a fresh dump. To remove the database entirely, delete the project with ddev delete --omit-snapshot.

Snapshot and restore a database

ddev snapshot

Restore the most recent snapshot with:

ddev snapshot restore --latest

Open the database CLI

ddev mysql

Open the database in a GUI

ddev sequelace

Opens the project database in Sequel Ace on macOS. Similar commands exist for other clients, such as ddev tableplus.

Drush commands

Clear the Drupal cache

ddev drush cr

Log in without a password

ddev drush uli

Generates a one-time login link for the admin account.

Import configuration

ddev drush cim

Export configuration

ddev drush cex

Run database updates

ddev drush updb

Enable a module

ddev drush en module_name

Uninstall a module

ddev drush pmu module_name

Run cron manually

ddev drush cron

Run a full deployment

ddev drush deploy

Runs database updates, imports configuration and rebuilds caches in the right order. See the Drush documentation for details.

Composer commands

Install all dependencies

ddev composer install

Update all dependencies

ddev composer update

Add a new package

ddev composer require drupal/package

Remove a package

ddev composer remove drupal/package

Disable the DDEV usage statistics prompt

DDEV asks once whether it may collect anonymous usage data. Opt out permanently with:

ddev config global --instrumentation-opt-in=false

In CI pipelines or scripts, use environment variables instead: DDEV_NO_INSTRUMENTATION=true disables usage reporting and DDEV_NONINTERACTIVE=true skips all interactive prompts:

DDEV_NONINTERACTIVE=true DDEV_NO_INSTRUMENTATION=true ddev start

Support DDEV

If you enjoy using DDEV, please consider showing your support for the project.

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