Skip to content

How-to guideFor site buildersDrupal CMS 2

Install Drupal CMS with DDEV

DDEV creates a complete web hosting environment on your computer, with everything Drupal CMS needs to run. Install Drupal CMS this way when you are building a site you intend to move to a hosting provider: DDEV uses a MariaDB database, the kind hosts support.

If you only want to explore Drupal CMS and are not worried about keeping your work, try it with the launcher instead and come back when you are ready to build.

A local Drupal CMS site running in DDEV, with the setup assistant completed and an admin account you control.

  • DDEV installed for your operating system, per the DDEV installation documentation. On Windows, use a WSL2 environment; commands in this guide assume it.
  • A terminal. Confirm DDEV works by running ddev --version.

Drupal CMS is downloaded with Composer, which DDEV includes. In a terminal, move with cd to where you want the project to live, then run (change my-drupal-site to the directory name you prefer):

Terminal window
mkdir my-drupal-site && cd my-drupal-site
ddev config --project-type=drupal11 --docroot=web
ddev composer create-project drupal/cms

This downloads Drupal CMS and everything it depends on into the new directory.

From the same directory, run:

Terminal window
ddev launch

Your browser opens the Drupal CMS setup assistant. You can find the URL of your local site at any time by running ddev status from the project directory.

The setup assistant walks you through four short screens:

  1. Name your site. Enter a site name or keep the default. The default theme displays this name in the header, and you can change it later in site-wide settings.

  2. Choose a site template. Starter begins nearly empty, ready for you to build what you need. Byte demonstrates a finished product marketing site for a software company. Haven, added in Drupal CMS 2.1, is designed for non-profit sites.

  3. Create your account. Enter an email address and password for the account you will administer the site with. You can invite colleagues to create their own accounts after you move the site to a hosting provider where they can reach it.

  4. Wait for setup to finish. A progress bar runs while Drupal CMS installs your template. When it completes, you land on the dashboard. The Top tasks area lists good next steps for building your new site.

When you are done working, shut the environment down with:

Terminal window
ddev stop

DDEV keeps the application and database. Pick up where you left off later with ddev launch.

  • Your browser shows the Drupal CMS dashboard, with Top tasks and recent content listed.
  • ddev status reports the project as running and prints its URL.
  • Explore before committing: the launcher runs Drupal CMS with no terminal and no DDEV, for trial use only.
  • Developing modules or themes against plain Drupal core: this guide installs the Drupal CMS product. For a bare Drupal 11 codebase, follow Install Drupal core in the developer docs.

Was this page helpful?

Drupal is a registered trademark of Dries Buytaert.