Setting up a PHP development environment used to be a rite of passage — and not the fun kind.
When I joined the team, the local dev setup had grown organically over the years — XAMPP on Windows, manual SSL certificates, environment variables scattered across .htaccess files. Six developers, all with subtly different configurations.
The problem
The worst part wasn't the setup itself — it was onboarding. Getting a new developer productive took 1–2 full days of hand-holding: installing the right PHP version, configuring Apache virtual hosts, mapping drive letters, fighting with Xdebug config.
Every developer had a slightly different environment, which meant bugs that were genuinely environment-specific.
The solution: WSL + DDEV + Docker
DDEV is an open-source local development environment tool built on Docker. It gives every project a reproducible, containerised environment defined entirely in .ddev/config.yaml — committed to the repo.
Combined with WSL2 (Windows Subsystem for Linux), we got:
- Consistent environments — the same Docker image on every machine
- Per-project PHP versions — no more global PHP installation conflicts
- Built-in Xdebug — one command to enable/disable
- Mailpit — local email catching out of the box
The migration
The migration itself took about a week:
- Documented the existing setup (PHP version, Apache vhosts, env vars, Xdebug config)
- Created a
.ddev/config.yamltranslating every piece of that config - Tested against the existing codebase end-to-end
- Wrote a setup guide (a single
READMEsection: install WSL2, install Docker Desktop, install DDEV, runddev start) - Ran a 2-hour workshop with the team
Results
Onboarding time dropped from 1–2 days to 1–2 hours. The environment is now fully reproducible: any developer can check out the repo and have a working local setup with one command.
I also contributed a bug fix back to the DDEV project (PR #6809) while doing the migration — a small way to give back to the tool that saved us hours.
Takeaways
- The upfront investment in a reproducible environment pays off immediately at hiring time
- DDEV's
.ddev/directory in version control is the key — no more "ask the guy who set it up originally" - Running a short workshop beats documentation alone; people need to do the setup once with someone watching