If you’re developing Drupal sites — or any PHP project — you’ve probably wrestled with local development environments. MAMP, XAMPP, native PHP installs — they all come with their own headaches. Enter DDEV, a Docker-based local development tool that solves these problems elegantly.
Why Choose DDEV Over Alternatives?
Sure, if you can run Composer, theoretically you could spin up a PHP-only server (
php -S localhost:8080) and use SQLite for the database. Good luck doing that in fewer steps than DDEV.
There are plenty of options — Lando, plain Docker Compose, and others. I’ve tried them all, and DDEV is where I’ve landed. One of the key reasons: DDEV integrates Mutagen for file syncing on macOS (and optionally Windows), which dramatically improves I/O performance compared to Docker’s default osxfs.
My current setup has evolved from ddev + Colima to ddev + Lima and ddev + OrbStack — both are noticeably faster.
What Does DDEV Offer?
🔒 SSL Out of the Box
No more browser security warnings or mixed-content issues. DDEV provisions trusted local SSL certificates automatically.
🌐 Custom Domain Names
Instead of remembering localhost:8080 or localhost:3000, you get clean URLs like your-project.ddev.site.
🗄️ Full Database Stack
MySQL, PostgreSQL, or MariaDB — take your pick. No SQLite limitations.
🚀 Easy Service Integration
Need phpMyAdmin? Redis? Solr? Elasticsearch? A single command adds any of them to your project.
📦 Infrastructure as Code
This is the most important benefit if you work across multiple projects. Your local infrastructure is defined as code and is consistent across every machine:
- Same PHP version across all environments
- Same database version
- Same extensions and configurations
- Easy version switching — run
ddev restartand you’re testing PHP 8.3 instead of 8.1
🔄 Multi-Project Support
DDEV lets you run multiple projects simultaneously on standard ports (80/443). No more port juggling.
🌍 Built-in Sharing
The built-in ngrok integration lets you share your local environment with clients or teammates instantly — no extra setup required.
Setting Up DDEV on Windows 11
Prerequisites: Enable WSL2
wsl --install Install Ubuntu:
wsl --install -d Ubuntu Set WSL2 as the default version, then follow the official DDEV guide for Windows: https://ddev.com/get-started/#platform-windows
Setting Up DDEV on macOS
Install Lima and Docker
brew install lima
brew install docker # Only needed if `docker help` fails Create a Lima VM
Create a 100 GB VM with 4 CPUs and 6 GB of memory. Adjust these values to your own needs:
limactl create --name=default
--vm-type=vz
--mount-type=virtiofs
--mount-writable
--memory=6
--cpus=4
--disk=100
template://docker
docker context create lima-default
--docker "host=unix://$HOME/.lima/default/sock/docker.sock"
docker context use lima-default
brew install ddev/ddev/ddev After the first setup, you can simply run limactl start to spin it back up. Use limactl list to see all configured VMs.
Creating Your First Project
Navigate to your project directory:
cd your-project-folder
ddev config Answer the prompts (project name, type, docroot), then start the environment:
ddev start Essential DDEV Commands
Project Management
ddev start # Start the project
ddev stop # Stop the project
ddev restart # Restart all containers
ddev delete # Remove the project and its containers Development Tools
ddev drush # Run Drush commands
ddev ssh # SSH into the web container
ddev composer # Run Composer inside the container
ddev mysql # Open a MySQL shell Debugging and Logs
ddev logs # View container logs
ddev describe # Show project details and service URLs
ddev launch # Open the project in your browser Database Management
ddev export-db # Export the database
ddev import-db # Import a database dump
ddev snapshot # Take a database snapshot (instant restore point) Adding Extra Services
DDEV has a rich add-on ecosystem. Install extras with a single command:
ddev get ddev/ddev-phpmyadmin # phpMyAdmin web UI
ddev get ddev/ddev-redis # Redis cache
ddev get ddev/ddev-solr # Apache Solr search Conclusion
DDEV removes the friction from local PHP development. Whether you’re onboarding a new developer, switching between Drupal versions, or just tired of localhost:8080, DDEV gives you a clean, reproducible, SSL-enabled environment in minutes.
If you haven’t tried it yet — give it a shot. Once you do, it’s hard to go back.
Have questions about DDEV setup or running into issues? Feel free to reach out. 🙂
