DDEV is an open source tool for launching local PHP development environments in minutes.
DDEV creates a config.yaml
, this contains all settings for your project. This can be versioned in GIT and supports collaborative work in teams or freelancers.
To use the DDEV, Docker must be installed on your system. If this is not yet the case, you can download the DDEV documentation for more information about installing these programs.
DDEV is available for all platforms, please refer to the DDEV documentation for the installation of your platform.
brew install ddev/ddev/ddev
After the installation install the local SSL certificates (afterwards restart your browser).
mkcert -install
You should also update your installation regularly.
brew upgrade ddev
curl -fsSL https://apt.fury.io/drud/gpg.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/ddev.gpg > /dev/null
echo "deb [signed-by=/etc/apt/trusted.gpg.d/ddev.gpg] https://apt.fury.io/drud/ * *" | sudo tee /etc/apt/sources.list.d/ddev.list
sudo apt update && sudo apt install -y ddev
If necessary, install the local SSL certificates after the installation (afterwards restart your browser).
mkcert -install
Installation Update
sudo apt update && sudo apt upgrade
Open the console of your choice, create the desired directory and then change to it.
mkdir -p ~/projects/contao/contao-ddev && cd ~/projects/contao/contao-ddev
Create the DDEV configuration with:
ddev config
Make DDEV settings, select php
as Project Type in any case. Leave the Docroot Location empty for now, because there is no public
folder for new installations and DDEV can not start then.
ddev start
For installation via console it is easiest to go via ssh into the container.
ddev ssh
composer create-project contao/managed-edition contao 4.13
In the .ddev/config.yaml
now adjust the docroot and restart ddev.
docroot: "contao/public"
To use Apache instead of NGINX, change your entry webserver_type: nginx-fpm
to apache-fpm
.
webserver_type: apache-fpm
The ddev
binary is not available in the container, so first switch to the host console with exit
.
ddev restart
A database already exists in DDEV. The connection data for the installation are:
entry | value |
---|---|
host | db |
username | db |
password | db |
Database | db |
The database of the current project can be accessed via the phpMyAdmin add-on. Enter the following command to automatically open a browser tab with the administration tool for MySQL databases:
ddev phpmyadmin
Since ddev version 1.22.0 the support of phpmyadmin has been converted into a DDEV add-on. Therefore the above command must be used instead of ddev launch -p
.
With ddev describe
you get an overview of the services available in the project and how to reach them. With ddev poweroff
you can stop all started projects/containers from any directory.
DDEV now offers Services as Addon.
ddev get ddev/ddev-adminer && ddev restart