Overview
This guide walks you through installing DDEV on Windows 11 using WSL2 to run a PHP environment with Docker.
System Requirements
- Windows 11 build 22000+ with Virtualization enabled
- WSL2 with Ubuntu (or other Linux distro)
- Docker Desktop for Windows (WSL2 backend)
- PowerShell or Windows Terminal access
- Internet connection for downloads
Installation Steps
-
Enable WSL2 & Virtualization
wsl --install dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all dism.exe /online /enable-feature /featurename:WindowsSubsystemForLinux /all
-
Install Ubuntu
wsl --set-default-version 2 wsl --install -d ubuntu
-
Install Docker Desktop
Download from docker.com, enable "Use the WSL 2 based engine", and integrate with Ubuntu.
-
Install Chocolatey & DDEV
Set-ExecutionPolicy Bypass -Scope Process -Force iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) choco install ddev -y
-
Configure DDEV Project
mkdir my-php-app && cd my-php-app ddev config --project-type=php --docroot=. --create-docroot
-
Start & Access
ddev start
Open http://my-php-app.ddev.site
Or use PHP built-in server:
ddev exec php -S 0.0.0.0:8000 -t .
Pros & Cons
✅ Pros
- Consistent, containerized setup across machines
- Quick project lifecycle (start/stop/remove)
- Automatic URL routing (*.ddev.site)
- Isolated environment avoids host conflicts
❌ Cons
- Initial setup complexity and WSL2 requirement
- Higher resource usage (Docker containers )
- Potential port collisions if many projects run