← 返回命令列表

Linux command

ddev 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Start a project

ddev start

Stop the project

ddev stop

Configure a new project

ddev config

Open project in browser

ddev launch

SSH into the web container

ddev ssh

Run composer command

ddev composer [install]

Import database

ddev import-db --file=[database.sql.gz]

Execute a command in the web container

ddev exec [command]

Show project status

ddev describe

List all DDEV projects

ddev list

说明

ddev is an open-source local development environment based on Docker. It provides pre-configured stacks for PHP applications including Drupal, WordPress, Laravel, TYPO3, Magento, and also supports Python and Node.js projects, eliminating the complexity of manually configuring web servers, databases, and language runtimes. The tool automatically provisions containers with appropriate versions of PHP, web server (nginx or Apache), database (MySQL, MariaDB, or PostgreSQL), and common services like Redis and Mailhog. Configuration is stored in .ddev/config.yaml, making development environments reproducible and shareable across teams. DDEV simplifies common development workflows through commands that proxy to tools inside containers (composer, mysql, npm) without requiring those tools on the host system. It supports multiple projects running simultaneously, automatic HTTPS with trusted certificates, and integration with development tools. The environment closely matches production configurations while remaining easy to set up and tear down, making it valuable for agencies managing multiple client projects or developers working across different technology stacks.

FAQ

What is the ddev command used for?

ddev is an open-source local development environment based on Docker. It provides pre-configured stacks for PHP applications including Drupal, WordPress, Laravel, TYPO3, Magento, and also supports Python and Node.js projects, eliminating the complexity of manually configuring web servers, databases, and language runtimes. The tool automatically provisions containers with appropriate versions of PHP, web server (nginx or Apache), database (MySQL, MariaDB, or PostgreSQL), and common services like Redis and Mailhog. Configuration is stored in .ddev/config.yaml, making development environments reproducible and shareable across teams. DDEV simplifies common development workflows through commands that proxy to tools inside containers (composer, mysql, npm) without requiring those tools on the host system. It supports multiple projects running simultaneously, automatic HTTPS with trusted certificates, and integration with development tools. The environment closely matches production configurations while remaining easy to set up and tear down, making it valuable for agencies managing multiple client projects or developers working across different technology stacks.

How do I run a basic ddev example?

Run `ddev start` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more ddev examples?

This page includes 10 examples for ddev, plus related commands for nearby Linux tasks.