
This guide will help you install DDEV and set up a local Drupal CMS environment on Windows (WSL2 + Ubuntu) and macOS in a simple and efficient way.
Guide for Windows (WSL2 + Ubuntu)
Step 1: Install WSL2 and Ubuntu
WSL2 (Windows Subsystem for Linux) allows you to run a Linux environment on Windows.
- Open PowerShell as administrator.
- Type the following command and press Enter:
wsl --install -d Ubuntu
- Wait for Ubuntu to install and restart your computer if necessary.
- Open Ubuntu from the start menu and follow the instructions to create a username and password.
- One inside Ubuntu, run:
sudo apt update && sudo apt upgrade -y
Step 2: Install Docker Desktop
Docker is required for DDEV to work properly.
- Download Docker Desktop from its website.
- Install it and, when finished, open Docker Desktop.
- Go to Settings → General and enable "Use the WSL 2 based engine".
- Then go to Resources → WSL Integration and make sure Ubuntu is enabled.
- Restart your computer to apply the changes.
- After restarting, open Docker Desktop manually to run it.
Step 3: Install DDEV
DDEV is a tool that simplifies the configuration of local development environments.
- Open Ubuntu and run these commands:
sudo apt update && sudo apt upgrade -y sudo apt install -y bash-completion curl -fsSL https://raw.githubusercontent.com/drud/ddev/master/scripts/install_ddev.sh | bash
- When finished, verify that DDEV is installed by running (if you see a version number, DDEV was successfully installed):
ddev --version
Step 4: Configure Drupal CMS with DDEV
- Create a directory for the project and access it:
mkdir my-drupal-site && cd my-drupal-site
- Configure the project in DDEV:
ddev config
- You will be asked some questions:
- Docroot Location: Type web and press Enter.
- Project Type: Type drupal and press Enter.
- Project Name: Type starshot-site or any other name you prefer.
- Start DDEV:
ddev start
In some cases, the following questions may appear:
- "DDEV needs to add your user to the 'docker' group. Do you want to proceed? (y/N)" If you see this question, answer “y” (yes) and press Enter. This will allow DDEV to use Docker without requiring additional permissions.
- "It looks like you have a new DDEV release. May we send anonymous DDEV usage statistics and errors?" DDEV may request permission to send anonymous usage statistics and error data. If you prefer to share this information, answer “y” (yes); otherwise, answer “N” (no).
💡 If you see and error with stability stable, ignore it and run ddev start again. If the site loads correctly, you can continue.
- Install Drupal. This command will download and configure Drupal on your computer:
ddev composer create drupal/cms
- Open the site in the browser:
ddev launch
If you get an error with xdg-open, install the package with::
sudo apt install xdg-utils -y
Then try ddev launch again.
If ddev launch does not open the site automatically, copy the link that appears in ddev status and paste it manually into your browser.
Guide for macOS
Step 1: Install Homebrew
Homebrew makes it easy to install packages on macOS.
- Open Terminal and run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Once installed, update Homebrew:
brew update
Step 2: Install Docker Desktop
- Download Docker Desktop from its website.
- Install it and make sure it is running.
- Restart your computer to apply the changes.
- After restarting, open Docker Desktop manually to run it.
Step 3: Install DDEV
- In Terminal, run:
brew install drud/ddev/ddev
- Verify that DDEV is installed with:
ddev --version
Step 4: Configure Drupal CMS with DDEV
- Create a directory for the project and access it:
mkdir my-drupal-site && cd my-drupal-site
- Configure the project in DDEV:
ddev config
- You will be asked some questions:
- Docroot Location: Type web and press Enter.
- Project Type: Type drupal and press Enter.
- Project Name: Type starshot-site or any other name you prefer.
- Start DDEV:
ddev start
After this command, DDEV may ask some questions:
- "DDEV needs to add your user to the 'docker' group. Do you want to proceed? (y/N)" If you see this question, answer “y” (yes) and press Enter. This will allow DDEV to use Docker without requiring additional permissions.
- "It looks like you have a new DDEV release. May we send anonymous DDEV usage statistics and errors?" DDEV may request permission to send anonymous usage statistics and error data. If you prefer to share this information, answer “y” (yes); otherwise, answer “N” (no).
💡 If you see and error with stability stable, ignore it and run ddev start again. If the site loads correctly, you can continue.
- Install Drupal:
ddev composer create drupal/cms
- Open the site in the browser:
ddev launch
If you get an error with xdg-open, install the package with:
sudo apt install xdg-utils -y
Then try ddev launch again.
If ddev launch does not open the site automatically, copy the link that appears in ddev status and paste it manually into your browser.
Notes
- To stop the environment, use:
ddev stop
- To restart it later, use:
ddev start
Following these steps, you will have Drupal CMS running on your local machine with DDEV ready to develop.