DDEV Blog: DDEV on Linux in 10 Minutes

Image removed.

This screencast walks you through setting up a complete DDEV development environment on Linux, starting completely from scratch. Whether you're new to DDEV or local development environments in general, this step-by-step guide will get you up and running quickly.

Video Outline

Here's the video table of contents (opens on YouTube):

  • Introduction (0:00)
  • Install Docker CE (0:30)
  • Docker Post-Installation (1:47)
  • Install DDEV (2:34)
  • Configure HTTPS Certificates (3:20)
  • Create Project (3:45)
  • Project Startup (5:00)
  • Launch Project (6:52)
  • Install PhpStorm (8:10)
  • Configure Xdebug (10:56)
  • Test Step Debugging (12:14)
  • Recap (13:19)

What Happens in This Screencast

Here's what happens in this screencast. You can do it yourself in just a few minutes. We're using DDEV's get-started, but of course there is far more detail in the DDEV docs, explaining how to use other distros or other install techniques.

  1. Install Docker CE. Use the apt repository technique from Docker's docs.
  • Do the post-install one-time action:sudo usermod -aG docker $USER`
  • We could log out and log back in, but instead for now:newgrp docker
  1. Install DDEV, using the apt repository technique from get-started.
  • ddev --version shows us being working fine with current stable.
  1. One-time mkcert -install helps your browser trust DDEV's HTTPS certificates.
  2. Check out a project. I used rfay/d11, a trivial demo Drupal 11 project. (DDEV's quickstarts show many different project types with quick startup.)
  3. ddev config the project. Most of the time you can take the defaults. But most of use use a non-interactive command like ddev config --project-type=drupal11 --docroot=web.
  4. ddev start the project. The first time on a new system you get the downloading of the Docker images.
  5. ddev composer install for most projects
  6. ddev launch and install with the web UI. On another project I might have used ddev import-db to load a database dump instead of doing an install.
  7. sudo snap install --classic phpstorm
  8. Open the project and set a breakpoint in web/index.php.
  9. Click the "Listen for PHP Debug Connection" button in PhpStorm.
  10. ddev xdebug on
  11. Visit the site in the browser. PhpStorm wakes up and asks us to map the code from the host/workstation side to the mount point in the container. The default usually works.
  12. Debug, step over, step in, view variables, etc.

Key Things to Know

  • Use your own IDE, including VS Code: I used PhpStorm here, but VS Code works great.

  • This demo used Ubuntu, but people use lots of distros: The differences for major platforms are shown in the docs, but the ideas are all the same, and people use all of them, including other Debian/Ubuntu, Fedora, and Arch Linux distros.

  • Cross-Platform Compatibility: DDEV works the same on macOS, Linux, Traditional Windows, and WSL2, see Getting Started. Your whole team can work on their preferred environment without friction. See DDEV on Windows in 10 Minutes and DDEV on macOS from Scratch.

  • Support for almost any PHP-based project and many Node.js environments DDEV supports development of so many different web environments, so you're not stuck with using separate tools for different CMSs.

  • More Extensive Docs:

  • Support the DDEV Project: DDEV is fully open-source and free to use, and run by the nonprofit DDEV Foundation. We ask you to help make us a sustainable project by sponsoring yourself or getting your organization to sponsor the project. Sponsor us on GitHub.

Questions? Issues? We're here to help:

Have you signed up for the monthly DDEV Newsletter? We'd love to have you.

Claude Code was used in editing this blog and in preparing video outline, etc. Canva AI helped with the banner image.

PubDate

Tags