Watch: DDEV from scratch with Windows WSL2
WSL2 (Windows Subsystem for Linux version 2) is finally generally available on recent editions of Windows! Because of Docker’s great support for WSL2, it’s now the preferred way to run your DDEV development environment on Windows. DDEV on WSL2 is as fast as DDEV on Linux, but you have all the Windows niceties you love there.
Traditionally, web developers working on Windows have had to cobble together all the tools that Linux (and macOS) developers take for granted, as well as maintaining and managing versions. With WSL2 Windows developers now have a full Linux toolkit with anything they could ever want (bash, zsh, grep, awk, vim, composer, make, npm, yarn, and on and on), standard packaging, all readily available. With DDEV in the mix they also have a super-fast local development environment that works the same as it does on Linux, macOS, (or traditional Windows, but much, much faster). And of course the traditional Windows problems with symlinks, different line endings, file formats, shell script support, all are solved by WSL2.
In this screencast I’m walking through the official DDEV WSL2 Installation Docs, but adding a little more detail. Then I show the basics of installing Chocolatey, mkcert, Docker Desktop, Homebrew, and DDEV, and basic usage of DDEV in action, including a TYPO3 CMS Composer install and demonstrations of a few key commands.
Note: One of the weaknesses of WSL2 is that PhpStorm isn’t really completely ready for it yet. There are two not-quite-satisfactory ways to use PhpStorm though. But VS Code has full and robust support for WSL2, including inside Docker containers. Our original article on WSL2 tells how to set up VS Code for use inside WSL2.
Here’s the video table of contents (opens on YouTube):
- What is DDEV? (1:02)
- What is WSL2? (2:52)
- Advantages and Disadvantages of WSL2 (3:44)
- WSL2 Installation (5:49)
- Installing Docker Desktop (13:29)
- Installing Homebrew and DDEV inside WSL2 (15:22)
- Installing and using bash-completion (19:06)
- Creating a super-simple PHP project (junk project) (20:38)
- Creating a TYPO3 project with
ddev composer create
(27:57) - Some most-important ddev commands (32:11)
- Resources and wrap-up (36:01)
Resources for you:
- DDEV documentation.
- WSL2 and DDEV Installation docs
- Support: Drupal slack and TYPO3 slack #ddev, gitter #ddev, Stack Overflow, and the DDEV issue queue.
- DDEV Project Repository
- More about PhpStorm on WSL2, with full details about how to run it.
- Using WSL2 (and VS Code), DDEV ❤️ WSL2: getting started