VOOZH about

URL: https://docs.ddev.com/en/latest/users/quickstart/

⇱ CMS Quickstarts - DDEV Docs


Skip to content

CMS Quickstarts

DDEV is ready to go with generic project types for PHP frameworks, and more specific project types for working with popular platforms and CMSes. To learn more about how to manage projects in DDEV visit Managing Projects.

Before proceeding, make sure your installation of DDEV is up to date. In a new and empty project folder, using your favorite shell, run the following commands:

Asterios

Use a new or existing Composer project, or clone a Git repository.

The Asterios project type can be used for Scaffolding and others, as it is used with basic Asterios. DDEV automatically updates or creates the .env file with the database information.

Create the project directory and configure DDEV:

mkdir-pmy-asterios-site&&cdmy-asterios-site
ddevconfig--project-type=asterios--docroot=public

Start DDEV (this may take a minute):

ddevstart

Install Asterios via Composer:

ddevcomposercreate-projectasterios/app

Launch the site:

ddevlaunch

Backdrop

You can start a new Backdrop project or configure an existing one.

Create the project directory and configure DDEV:

mkdir-pmy-backdrop-site&&cdmy-backdrop-site
ddevconfig--project-type=backdrop
# Add the official Bee CLI add-on
ddevadd-ongetbackdrop-ops/ddev-backdrop-bee

Start DDEV (this may take a minute):

ddevstart

Download Backdrop core and create admin user:

# Download Backdrop core
ddevbeedownload-core
# Create admin user
ddevbeesi--username=admin--password=Password123--db-name=db--db-user=db--db-pass=db--db-host=db--auto

Launch the site:

# Login using `admin` user and `Password123` password
ddevlaunch

You can start using DDEV with an existing project, too—but make sure you have a database backup handy!

Create project directory and clone your repository:

mkdir-pmy-backdrop-site&&cdmy-backdrop-site
gitclonehttps://github.com/ddev/test-backdrop.git.

Configure DDEV:

ddevconfig--project-type=backdrop

Add the official Bee CLI add-on:

ddevadd-ongetbackdrop-ops/ddev-backdrop-bee

Start DDEV (this may take a minute):

ddevstart

Import database and files backups:

ddevimport-db--file=/path/to/db.sql.gz
ddevimport-files--source=/path/to/files.tar.gz
ddevbeeccall

Launch the site:

ddevlaunch

CakePHP

You can start a new CakePHP project or configure an existing one.

The CakePHP project type can be used with any CakePHP project >= 3.x, but it has been fully tested with CakePHP 5.x. DDEV automatically creates the .env file with the database information, email transport configuration and a random salt. If .env file already exists, .env.ddev will be created, so you can take any variable and put it into your .env file.

Please note that you will need to change the PHP version to 7.4 to be able to work with CakePHP 3.x.

Create the project directory and configure DDEV:

mkdir-pmy-cakephp-composer-site&&cdmy-cakephp-composer-site
ddevconfig--project-type=cakephp--docroot=webroot

Start DDEV (this may take a minute):

ddevstart

Install CakePHP via Composer:

ddevcomposercreate-project--prefer-dist--no-interactioncakephp/app:~5.0

Launch the site:

ddevlaunch

Clone the repository and configure DDEV:

gitclone<my-cakephp-repo>my-cakephp-git-site
cdmy-cakephp-git-site
ddevconfig--project-type=cakephp--docroot=webroot

Start DDEV (this may take a minute):

ddevstart

Install dependencies and launch:

ddevcomposerinstall
ddevcake
ddevlaunch

CiviCRM (Standalone)

CiviCRM Standalone allows running CiviCRM without a CMS. Visit Install CiviCRM (Standalone) for more installation details.

Create the project directory and configure DDEV:

mkdir-pmy-civicrm-site&&cdmy-civicrm-site
ddevconfig--project-type=php--composer-root=core--upload-dirs=public/media

Start DDEV (this may take a minute):

ddevstart

Download and extract CiviCRM:

ddevexec"curl -LsS https://download.civicrm.org/latest/civicrm-STABLE-standalone.tar.gz -o /tmp/civicrm-standalone.tar.gz"
ddevexec"tar --strip-components=1 -xzf /tmp/civicrm-standalone.tar.gz"
ddevcomposerrequirecivicrm/cli-tools--no-scripts

Install CiviCRM (or use ddev launch to install manually):

# You can install CiviCRM manually in your browser using `ddev launch`
# and selecting `db` for the server and `db` for database/username/password
# or do the same automatically using the command below:
# The parameter `-m loadGenerated=1` includes sample data
ddevexeccvcore:install\
--cms-base-url='$DDEV_PRIMARY_URL'\
--db=mysql://db:db@db/db\
-mloadGenerated=1\
-mextras.adminUser=admin\
-mextras.adminPass=admin\
-mextras.adminEmail=admin@example.com

Launch the site:

ddevlaunch

CodeIgniter

Use a new or existing Composer project, or clone a Git repository.

DDEV automatically updates or creates the .env file with the database information.

Create the project directory and configure DDEV:

mkdir-pmy-ci4-site&&cdmy-ci4-site
ddevconfig--project-type=codeigniter--docroot=public

Start DDEV (this may take a minute):

ddevstart

Install CodeIgniter via Composer:

ddevcomposercreate-projectcodeigniter4/appstarter

Launch the site:

ddevlaunch

Contao

Further information on the DDEV procedure can also be found in the Contao documentation.

Create the project directory and configure DDEV:

mkdir-pmy-contao-composer-site&&cdmy-contao-composer-site
ddevconfig--project-type=php--docroot=public--webserver-type=apache-fpm--php-version=8.4

Install Contao via Composer (this may take a minute):

ddevcomposercreate-projectcontao/managed-edition:5.7

Configure database and mailer settings:

ddevdotenvset.env.local--database-url=mysql://db:db@db:3306/db--mailer-dsn=smtp://localhost:1025

Create the database:

ddevexeccontao-consolecontao:migrate--no-interaction

Create backend user:

ddevexeccontao-consolecontao:user:create--username=admin--name=Administrator--email=admin@example.com--language=en--password=Password123--admin

Launch the administration area:

ddevlaunchcontao

Like most PHP projects, Contao could be installed and updated with Composer. The Contao Manager is a tool that provides a graphical user interface to manage a Contao installation.

Create the project directory and configure DDEV:

mkdir-pmy-contao-manager-site&&cdmy-contao-manager-site
ddevconfig--project-type=php--docroot=public--webserver-type=apache-fpm--php-version=8.4

Configure database and mailer settings:

ddevdotenvset.env.local--database-url=mysql://db:db@db:3306/db--mailer-dsn=smtp://localhost:1025

Start DDEV (this may take a minute):

ddevstart

Download the Contao Manager:

ddevexec"wget -O public/contao-manager.phar.php https://download.contao.org/contao-manager/stable/contao-manager.phar"

Launch the Contao Manager and follow the setup wizard:

ddevlaunchcontao-manager.phar.php

The Contao demo website is maintained for the currently supported Contao versions and can be optionally installed. Via the Contao Manager you can select this option during the first installation.

Craft CMS

Start a new Craft CMS project or retrofit an existing one.

DDEV injects a number of special environment variables into the container (via .ddev/.env.web) that automatically configure Craft’s database connection and the project’s primary site URL. You may opt out of this behavior with the disable_settings_management setting.

Compatibility with Craft CMS 3

The craftcms project works best with configuration features that became available in Craft CMS 4.x. If you are using Craft CMS 3.x or earlier, you may want to use the php project type and explicitly define database connection details via Craft’s db.php.

Create the project directory and configure DDEV:

mkdir-pmy-craft-site&&cdmy-craft-site
ddevconfig--project-type=craftcms--docroot=web

Start DDEV (this may take a minute):

ddevstart

Scaffold a new project with Composer:

ddevcomposercreate-projectcraftcms/craft

Craft’s setup wizard will start automatically!

Third-party starter projects can be substituted for craftcms/craft when running ddev composer create-project.

You can start using DDEV with an existing Craft project, too. All you need is the codebase and a database backup!

Clone the repository (or navigate to a local project directory):

gitclonehttps://github.com/example/example-sitemy-craft-site
cdmy-craft-site

Configure DDEV:

ddevconfig--project-type=craftcms--docroot=web

Start DDEV and install Composer packages:

ddevstart
ddevcomposerinstall

Import database backup and launch:

ddevcraftdb/restore/path/to/db.sql.gz
ddevlaunch

Craft CMS projects use MySQL 8.0, by default. You can override this setting (and the PHP version) during setup with config command flags or after setup via the configuration files.

Running Craft in a Subdirectory

Set composer_root to the subdirectory where Craft is installed. For example, ddev config --composer-root=app.

Installing Craft

Read more about installing Craft in the official documentation.

Drupal

Create the project directory and configure DDEV:

mkdir-pmy-drupal11-site&&cdmy-drupal11-site
ddevconfig--project-type=drupal11--docroot=web

Start DDEV (this may take a minute):

ddevstart

Install Drupal via Composer:

ddevcomposercreate-projectdrupal/recommended-project
ddevcomposerrequiredrush/drush

Run Drupal installation and launch:

ddevdrushsite:install--account-name=admin--account-pass=admin-y
ddevlaunch
# or automatically log in with:
ddevlaunch$(ddevdrushuli)

Read more about Drupal Core & Documentation.

Create the project directory and configure DDEV:

mkdir-pmy-drupalcms-site&&cdmy-drupalcms-site
ddevconfig--project-type=drupal11--docroot=web

Start DDEV (this may take a minute):

ddevstart

Install Drupal CMS via Composer:

ddevcomposercreate-projectdrupal/cms
# Note: recipe-unpack runs automatically in DDEV v1.25.0+
ddevcomposerdrupal:recipe-unpack

Launch the site:

ddevlaunch

Read more about Drupal CMS & Documentation.

Create the project directory and configure DDEV:

mkdir-pmy-drupal10-site&&cdmy-drupal10-site
ddevconfig--project-type=drupal10--docroot=web

Start DDEV (this may take a minute):

ddevstart

Install Drupal via Composer:

ddevcomposercreate-project"drupal/recommended-project:^10"
ddevcomposerrequiredrush/drush

Run Drupal installation and launch:

ddevdrushsite:install--account-name=admin--account-pass=admin-y
ddevlaunch
# or automatically log in with:
ddevlaunch$(ddevdrushuli)

Read more about Drupal Core & Documentation.

Clone your Drupal repository:

gitclonehttps://github.com/example/my-drupal-site
cdmy-drupal-site

Configure DDEV (follow prompts):

ddevconfig

Start DDEV and launch:

ddevstart
ddevlaunch/install.php

Drupal 7 doesn’t know how to redirect from the front page to /install.php if the database is not set up but the settings files are set up, so launching with /install.php gets you started with an installation. You can also run drush site-install, then ddev exec drush site-install --yes.

See Importing a Database.

This example shows how to work on an existing Drupal project, using a clone of a test repository. Replace with your Git repository.

Clone your web project repository:

PROJECT_GIT_URL=https://github.com/ddev/test-drupal11.git
gitclone${PROJECT_GIT_URL}my-drupal11-site
cdmy-drupal11-site

Configure and start DDEV:

ddevconfig--project-type=drupal11--docroot=web
ddevstart

Install dependencies and set up Drupal:

ddevcomposerinstall
ddevdrushsite:install--account-name=admin--account-pass=admin-y

Launch the site:

ddevlaunch

Read more about Drupal Core & Documentation.

Those who want to try out the unreleased upcoming Drupal 12 can install it this way:

mkdir-pmy-drupal12-site&&cdmy-drupal12-site
ddevconfig--project-type=drupal12--docroot=web

Start DDEV (this may take a minute):

ddevstart

Install Drupal via Composer:

ddevcomposercreate-projectdrupal/recommended-project:main-dev@dev
ddevcomposerrequiredrush/drush

Run Drupal installation and launch:

ddevdrushsite:install--account-name=admin--account-pass=admin-y
ddevlaunch
# or automatically log in with:
ddevlaunch$(ddevdrushuli)

Read more about Drupal Core & Documentation.

ExpressionEngine

Create the project directory:

mkdir-pmy-ee-zip-site&&cdmy-ee-zip-site

Download and extract the latest ExpressionEngine release:

DOWNLOAD_URL=$(curl-sLhttps://api.github.com/repos/ExpressionEngine/ExpressionEngine/releases/latest|dockerrun-i--rmddev/ddev-utilitiesjq-r'.assets | map(select(.name | test("^ExpressionEngine.*\\.zip$")))[0].browser_download_url')
curl-oee.zip-L"${DOWNLOAD_URL}"
unzipee.zip&&rm-fee.zip

Configure and start DDEV:

ddevconfig--database=mysql:8.0
ddevstart

Launch the installation wizard:

ddevlaunch/admin.php

When the installation wizard prompts for database settings, enter db for the DB Server Address, DB Name, DB Username, and DB Password.

Visit your site.

Follow these steps based on the ExpressionEngine Git Repository README.md:

Create the project directory and clone the repository:

mkdir-pmy-ee-git-site&&cdmy-ee-git-site
gitclonehttps://github.com/ExpressionEngine/ExpressionEngine.

Configure and start DDEV:

ddevconfig--database=mysql:8.0
ddevstart

Install Composer dependencies and prepare installation:

ddevcomposerinstall
touchsystem/user/config/config.php
echo"EE_INSTALL_MODE=TRUE">.env.php

Launch the installation wizard:

ddevlaunch/admin.php

When the installation wizard prompts for database settings, enter db for the DB Server Address, DB Name, DB Username, and DB Password.

Generic

The webserver_type: generic allows you to define your own web server process(es) and exposed ports for projects that don’t use the standard nginx-fpm or apache-fpm configurations.

Looking for more advanced generic web server examples?

Check out the Node.js and Wagtail examples below.

See also the ddev-frankenphp add-on, which uses the generic webserver under the hood.

This trivial example demonstrates running PHP’s built-in web server inside DDEV’s web container. The ddev-webserver container will not start the default nginx or php-fpm daemons—the PHP built-in server will handle all requests. You probably wouldn’t find this useful compared to the normal nginx-fpm or apache-fpm configurations, but it’s offered here as an example of how the generic webserver type works.

Create the project directory and configure DDEV:

exportGENERIC_SITENAME=my-generic-site
mkdir-p${GENERIC_SITENAME}&&cd${GENERIC_SITENAME}
ddevconfig--project-type=php

Create a sample PHP info page:

echo"<?php phpinfo(); ?>">index.php

Configure the web server to run PHP’s built-in server:

cat<<'EOF' > .ddev/config.php-server.yaml
webserver_type: generic
web_extra_daemons:
 - name: "php-server"
 command: "php -S 0.0.0.0:8000 -t \"${DDEV_DOCROOT:-.}\""
 directory: /var/www/html
web_extra_exposed_ports:
 - name: "php-server"
 container_port: 8000
 http_port: 80
 https_port: 443
EOF

Start DDEV (this may take a minute):

ddevstart

Launch the site:

ddevlaunch

Grav

Create the project directory and configure DDEV:

mkdir-pmy-grav-composer-site&&cdmy-grav-composer-site
ddevconfig--php-version=8.3--omit-containers=db

Start DDEV (this may take a minute):

ddevstart

Install Grav via Composer:

ddevcomposercreate-projectgetgrav/grav

Install the admin plugin and launch:

ddevexecgpminstalladmin-y
ddevlaunch

Create the project directory and clone Grav:

mkdir-pmy-grav-git-site&&cdmy-grav-git-site
gitclone-bmasterhttps://github.com/getgrav/grav.git.

Configure DDEV:

ddevconfig--php-version=8.3--omit-containers=db

Start DDEV (this may take a minute):

ddevstart

Install dependencies and initialize Grav:

ddevcomposerinstall
ddevexecgravinstall

Install the admin plugin and launch:

ddevexecgpminstalladmin-y
ddevlaunch

How to update?

Upgrade Grav core:

ddevexecgpmselfupgrade-f

Update plugins and themes:

ddevexecgpmupdate-f

Visit the Grav Documentation for more information about Grav in general and visit Local Development with DDEV for more details about the usage of Grav with DDEV.

Ibexa DXP

Install Ibexa DXP OSS Edition.

Create the project directory and configure DDEV:

mkdir-pmy-ibexa-site&&cdmy-ibexa-site
ddevconfig--project-type=php--docroot=public--web-environment-addDATABASE_URL=mysql://db:db@db:3306/db

Start DDEV (this may take a minute):

ddevstart

Install Ibexa via Composer:

ddevcomposercreate-projectibexa/oss-skeleton

Run Ibexa installation:

ddevexecconsoleibexa:install--no-interaction

Launch the admin interface:

ddevlaunch/admin/login

In the web browser, log into your account using admin and publish.

Visit Ibexa documentation for more cases.

Joomla

Create the project directory and download Joomla:

mkdir-pmy-joomla-site&&cdmy-joomla-site
curl-ojoomla.zip-L"https://www.joomla.org/latest"
unzipjoomla.zip&&rm-fjoomla.zip

Configure DDEV:

ddevconfig--project-type=joomla

Adjust php.ini settings for Joomla:

echo"display_errors = off">.ddev/php/joomla.ini
echo"output_buffering = off">>.ddev/php/joomla.ini

Start DDEV (this may take a minute):

ddevstart

Install Joomla:

ddevphpinstallation/joomla.phpinstall--site-name="My Joomla Site"--admin-user="Administrator"--admin-username=admin--admin-password=AdminAdmin1!--admin-email=admin@example.com--db-type=mysql--db-encryption=0--db-host=db--db-user=db--db-pass="db"--db-name=db--db-prefix=ddev_--public-folder=""

Launch the admin interface (login with admin and AdminAdmin1!):

ddevlaunch/administrator

Kirby CMS

Start a new Kirby CMS project or use an existing one.

Create a new Kirby CMS project from the official Starterkit using DDEV’s composer create-project command:

Create the project directory and configure DDEV:

mkdir-pmy-kirby-site&&cdmy-kirby-site
ddevconfig--omit-containers=db--webserver-type=apache-fpm

Start DDEV (this may take a minute):

ddevstart

Install the Kirby Starterkit:

ddevcomposercreate-projectgetkirby/starterkit

Launch the site:

ddevlaunch

You can start using DDEV with an existing project as well:

Navigate to your existing project directory:

cdmy-kirby-site

Configure DDEV:

ddevconfig--omit-containers=db--webserver-type=apache-fpm

Start DDEV (this may take a minute):

ddevstart

Launch the site:

ddevlaunch

Installing Kirby

Read more about developing your Kirby project with DDEV in our extensive DDEV guide.

Laravel

Use a new or existing Composer project, or clone a Git repository.

The Laravel project type can be used for StarterKits, Laravel Livewire and others, as it is used with basic Laravel. DDEV automatically updates or creates the .env file with the database information.

Laravel defaults to SQLite, but we use MariaDB to better mimic a production environment:

Create the project directory and configure DDEV:

mkdir-pmy-laravel-composer-site&&cdmy-laravel-composer-site
ddevconfig--project-type=laravel--docroot=public

Start DDEV (this may take a minute):

ddevstart

Install Laravel via Composer:

ddevcomposercreate-projectlaravel/laravel

Launch the site:

ddevlaunch

To use the SQLite configuration provided by Laravel:

Create the project directory and configure DDEV:

mkdir-pmy-laravel-sqlite-site&&cdmy-laravel-sqlite-site
ddevconfig--project-type=laravel--docroot=public--omit-containers=db

Start DDEV (this may take a minute):

ddevstart

Install Laravel via Composer:

ddevcomposercreate-projectlaravel/laravel

Launch the site:

ddevlaunch

To switch an existing Laravel project to SQLite:

Configure for SQLite and restart:

ddevconfig--project-type=laravel--docroot=public--omit-containers=db
ddevrestart

Run post-install scripts:

ddevcomposerrun-scriptpost-root-package-install
ddevdotenvset.env--db-connection=sqlite
ddevcomposerrun-scriptpost-create-project-cmd

Launch the site:

ddevlaunch

Create the project directory and configure DDEV:

mkdir-pmy-laravel-installer-site&&cdmy-laravel-installer-site
ddevconfig--project-type=laravel--docroot=public
# For SQLite instead, use:
# ddev config --project-type=laravel --docroot=public --omit-containers=db

Create Dockerfile to add Laravel installer:

cat<<'DOCKERFILEEND' >.ddev/web-build/Dockerfile.laravel
ARG COMPOSER_HOME=/usr/local/composer
RUN composer global require laravel/installer
RUN ln -s $COMPOSER_HOME/vendor/bin/laravel /usr/local/bin/laravel
DOCKERFILEEND

Start DDEV (this may take a minute):

ddevstart

Run Laravel installer (follow prompts and select starter kit):

ddevexeclaravelnewtemp--database=sqlite
# SQLite is used here as other database types would fail due to
# the .env file not being ready, which DDEV will fix on 'ddev restart'

Move files and clean up:

ddevexec'rsync -rltgopD temp/ ./ && rm -rf temp'
rm-f.ddev/web-build/Dockerfile.laravel.env

Restart and finalize:

ddevrestart
ddevcomposerrun-scriptpost-root-package-install
ddevcomposerrun-scriptpost-create-project-cmd

Launch the site:

ddevlaunch

Clone your Laravel repository:

gitclone<my-laravel-repo>my-laravel-git-site
cdmy-laravel-git-site

Configure and start DDEV:

ddevconfig--project-type=laravel--docroot=public
ddevstart

Install dependencies and run post-install scripts:

ddevcomposerinstall
ddevcomposerrun-scriptpost-root-package-install
ddevcomposerrun-scriptpost-create-project-cmd

Launch the site:

ddevlaunch

Add Vite support?

Since Laravel v9.19, Vite is included as the default asset bundler. See the Vite Integration documentation for complete setup instructions.

Magento 2

Normal details of a Composer build for Magento 2 are on the Magento 2 site. You must have a public and private key to install from Magento’s repository. When prompted for “username” and “password” in composer create-project, it’s asking for your public key as “username” and private key as “password”.

Store Adobe/Magento Composer credentials in the global DDEV config

If you have Composer installed on your workstation and have an auth.json you can reuse the auth.json by making a symlink. See the example in Composer Authentication.

Alternately, you can install the Adobe/Magento Composer credentials in your global $HOME/.ddev/homeadditions/.composer/auth.json and never have to enter them again (see below):

Create the project directory and configure DDEV:

exportMAGENTO_HOSTNAME=my-magento2-site
mkdir-p${MAGENTO_HOSTNAME}&&cd${MAGENTO_HOSTNAME}
ddevconfig--project-type=magento2--docroot=pub--upload-dirs=media--disable-settings-management
ddevadd-ongetddev/ddev-opensearch

Start DDEV (this may take a minute):

ddevstart

Install Magento via Composer:

ddevcomposercreate-project--repositoryhttps://repo.magento.com/magento/project-community-edition
rm-fapp/etc/env.php

Run Magento setup:

ddevmagentosetup:install--base-url="https://${MAGENTO_HOSTNAME}.ddev.site/"\
--cleanup-database--db-host=db--db-name=db--db-user=db--db-password=db\
--opensearch-host=opensearch--search-engine=opensearch--opensearch-port=9200\
--admin-firstname=Magento--admin-lastname=User--admin-email=user@example.com\
--admin-user=admin--admin-password=Password123--language=en_US

Configure Magento and launch:

ddevmagentodeploy:mode:setdeveloper
ddevmagentomodule:disableMagento_TwoFactorAuthMagento_AdminAdobeImsTwoFactorAuth
ddevconfig--disable-settings-management=false
# Change the backend frontname URL to /admin_ddev
ddevmagentosetup:config:set--backend-frontname="admin_ddev"--no-interaction
# Login using `admin` user and `Password123` password
ddevlaunch/admin_ddev

Change the admin name and related information as needed.

The admin login URL is specified by frontName in app/etc/env.php.

You may want to add the Magento 2 Sample Data with:

ddev magento sampledata:deploy
ddev magento setup:upgrade

Moodle

Create the project directory and configure DDEV:

mkdir-pmy-moodle-site&&cdmy-moodle-site
ddevconfig--docroot=public--webserver-type=apache-fpm

Start DDEV (this may take a minute):

ddevstart

Install Moodle via Composer:

ddevcomposercreate-projectmoodle/moodle

Run Moodle installation:

ddevexec'php admin/cli/install.php --non-interactive --agree-license --wwwroot=$DDEV_PRIMARY_URL --dbtype=mariadb --dbhost=db --dbname=db --dbuser=db --dbpass=db --fullname="DDEV Moodle Demo" --shortname=Demo --adminemail=admin@example.com --adminpass=password'

Launch Moodle (login with admin and password)::

ddevlaunch/login

Visit the Moodle Admin Quick Guide for more information.

Tip

Moodle relies on a periodic cron job—don’t forget to set that up! See ddev/ddev-cron.

Node.js

This example installation sets up the SvelteKit demo in DDEV with the generic webserver.

Node.js support as in this example is experimental, and your suggestions and improvements are welcome.

exportSVELTEKIT_SITENAME=my-sveltekit-site
mkdir-p${SVELTEKIT_SITENAME}&&cd${SVELTEKIT_SITENAME}
ddevconfig--project-type=generic--webserver-type=generic
ddevstart

cat<<EOF > .ddev/config.sveltekit.yaml
web_extra_exposed_ports:
 - name: svelte
 container_port: 3000
 http_port: 80
 https_port: 443
web_extra_daemons:
 - name: "sveltekit-demo"
 command: "node build"
 directory: /var/www/html
EOF

ddevexec"npx sv create --template=demo --types=ts --no-add-ons --no-install ."
# When it prompts "Directory not empty. Continue?", choose Yes.

# Install an example svelte.config.js that uses adapter-node
ddevexeccurl-s-OLhttps://raw.githubusercontent.com/ddev/test-sveltekit/main/svelte.config.js
# Install an example vite.config.ts that sets the port and allows all hostnames
ddevexeccurl-s-OLhttps://raw.githubusercontent.com/ddev/test-sveltekit/main/vite.config.ts
ddevnpminstall@sveltejs/adapter-node
ddevnpminstall
ddevnpmrunbuild
ddevrestart
ddevlaunch

SvelteKit requires just a bit of configuration to make it run. There are many ways to make any Node.js site work, these are just examples. The svelte.config.js and vite.config.js used above can be adapted in many ways. For more comprehensive Vite configuration options, see the Vite Integration documentation.

  • svelte.config.js example uses adapter-node.
  • vite.config.js uses port 3000 and allowedHosts: true
exportNODEJS_SITENAME=my-nodejs-site
mkdir-p${NODEJS_SITENAME}&&cd${NODEJS_SITENAME}
ddevconfig--project-type=generic--webserver-type=generic
ddevstart
ddevnpminstallexpress

cat<<EOF > .ddev/config.nodejs.yaml
web_extra_exposed_ports:
 - name: node-example
 container_port: 3000
 http_port: 80
 https_port: 443

web_extra_daemons:
 - name: "node-example"
 command: "node server.js"
 directory: /var/www/html
EOF

ddevexeccurl-s-Ohttps://raw.githubusercontent.com/ddev/test-nodejs/main/server.js
ddevrestart
ddevlaunch

The server.js used here is a trivial Express-based Node.js webserver. Yours will be more extensive.

OpenMage

Visit OpenMage Docs for more installation details.

Create the project directory and configure DDEV:

mkdir-pmy-openmage-composer-site&&cdmy-openmage-composer-site
ddevconfig--project-type=magento--docroot=public_test--php-version=8.1--web-environment-add=MAGE_IS_DEVELOPER_MODE=1

Start DDEV (this may take a minute):

ddevstart

Initialize and configure Composer:

ddevcomposerinit--name"openmage/composer-test"--description"OpenMage starter project"--type"project"-l"OSL-3.0"-s"dev"-q
ddevcomposerconfigextra.magento-root-dir"public_test"
ddevcomposerconfigextra.enable-patchingtrue
ddevcomposerconfigextra.magento-core-package-type"magento-source"
ddevcomposerconfigallow-plugins.cweagans/composer-patchestrue
ddevcomposerconfigallow-plugins.magento-hackathon/magento-composer-installertrue
ddevcomposerconfigallow-plugins.aydin-hassan/magento-core-composer-installertrue
ddevcomposerconfigallow-plugins.openmage/composer-plugintrue
ddevcomposerrequire--no-update"aydin-hassan/magento-core-composer-installer":"^2.1.0""openmage/magento-lts":"^20.13"

Download the OpenMage install command and install dependencies:

ddevexecwget-O.ddev/commands/web/openmage-installhttps://raw.githubusercontent.com/OpenMage/magento-lts/refs/heads/main/.ddev/commands/web/openmage-install
ddevcomposerinstall

Run OpenMage silent installation with sample data:

ddevopenmage-install-q

Launch the admin interface (login with admin and veryl0ngpassw0rd):

ddevlaunch/admin

Make sure that docroot is set correctly

DDEV config --docroot has to match Composer config extra.magento-root-dir.

Create the project directory and clone the repository:

mkdir-pmy-openmage-git-site&&cdmy-openmage-git-site
gitclonehttps://github.com/OpenMage/magento-lts.

Configure and start DDEV:

ddevconfig--project-type=magento--php-version=8.1--web-environment-add=MAGE_IS_DEVELOPER_MODE=1
ddevstart

Install Composer dependencies:

ddevcomposerinstall

Run OpenMage silent installation with sample data:

ddevopenmage-install-q

Launch the admin interface (login with admin and veryl0ngpassw0rd):

ddevlaunch/admin

Note that OpenMage itself provides several custom DDEV commands, including openmage-install, openmage-admin, phpmd, rector, phpcbf, phpstan, vendor-patches, and php-cs-fixer.

October CMS

Start a new October CMS project or configure an existing one.

October CMS is built on Laravel, so it uses the laravel project type. DDEV automatically updates or creates the .env file with the database information.

Create the project directory and configure DDEV:

mkdir-pmy-october-site&&cdmy-october-site
ddevconfig--project-type=laravel--webserver-type=apache-fpm

Start DDEV (this may take a minute):

ddevstart

Install October CMS via Composer:

ddevcomposercreate-projectoctober/october

Run the installer:

ddevartisanoctober:install--no-interaction

Launch the site:

ddevlaunch

You can start using DDEV with an existing October CMS project too — but make sure you have a database backup handy!

Clone the repository (or navigate to a local project directory):

gitclone<my-october-repo>my-october-site
cdmy-october-site

Configure DDEV:

ddevconfig--project-type=laravel--webserver-type=apache-fpm

Start DDEV and install dependencies:

ddevstart
ddevcomposerinstall

Import your database and run migrations:

ddevimport-db--file=/path/to/db.sql.gz
ddevartisanoctober:migrate

Launch the site:

ddevlaunch

Installing October CMS

Read more about installing October CMS in the official documentation.

Pimcore

Using the Pimcore skeleton repository:

Create the project directory and configure DDEV:

mkdir-pmy-pimcore-site&&cdmy-pimcore-site
ddevconfig--project-type=php--docroot=public--webimage-extra-packages='php${DDEV_PHP_VERSION}-amqp'

Start DDEV (this may take a minute):

ddevstart

Install Pimcore via Composer:

ddevcomposercreate-projectpimcore/skeleton

Run Pimcore installation:

ddevexecpimcore-install\
--mysql-username=db\
--mysql-password=db\
--mysql-host-socket=db\
--mysql-database=db\
--admin-password=admin\
--admin-username=admin

Create consumer daemon configuration:

echo"web_extra_daemons:
 - name: consumer
 command: 'while true; do /var/www/html/bin/console messenger:consume pimcore_core pimcore_maintenance pimcore_scheduled_tasks pimcore_image_optimize pimcore_asset_update --memory-limit=250M --time-limit=3600; done'
 directory: /var/www/html">.ddev/config.pimcore.yaml

Restart and launch:

ddevrestart
ddevlaunch/admin

ProcessWire

To get started with ProcessWire, create a new directory and use the ZIP file download, composer, or Git checkout to build. These instructions are adapted from ProcessWire Install Documentation.

Create the project directory:

mkdir-pmy-processwire-zip-site&&cdmy-processwire-zip-site

Download and extract ProcessWire:

curl-LJOfhttps://github.com/processwire/processwire/archive/master.zip
unzipprocesswire-master.zip&&rm-fprocesswire-master.zip&&mvprocesswire-master/*.&&mvprocesswire-master/.*.2>/dev/null&&rm-rfprocesswire-master

Configure and start DDEV:

ddevconfig--project-type=php--webserver-type=apache-fpm
ddevstart

Launch ProcessWire:

ddevlaunch

Create the project directory and configure DDEV:

mkdir-pmy-processwire-composer-site&&cdmy-processwire-composer-site
ddevconfig--project-type=php--webserver-type=apache-fpm

Start DDEV (this may take a minute):

ddevstart

Install ProcessWire via Composer:

ddevcomposercreate-project"processwire/processwire:^3"

Launch ProcessWire:

ddevlaunch

Create the project directory:

mkdir-pmy-processwire-git-site&&cdmy-processwire-git-site

Clone ProcessWire (main branch for stable release):

gitclonehttps://github.com/processwire/processwire.git.
# For latest features, use dev branch instead:
# git clone -b dev https://github.com/processwire/processwire.git .

Configure and start DDEV:

ddevconfig--webserver-type=apache-fpm
ddevstart

Launch ProcessWire:

ddevlaunch

When the installation wizard prompts for database settings, enter:

  • DB Name = db
  • DB User = db
  • DB Pass = db
  • DB Host = db (not localhost!)
  • DB Charset = utf8mb4
  • DB Engine = InnoDB

If you get a warning about “Apache mod_rewrite” during the compatibility check, Click “refresh”.

After installation, configure upload_dirs to specify where user-generated files are managed by Processwire:

ddevconfig--upload-dirs=sites/assets/files&&ddevrestart

Shopware

Though you can set up a Shopware 6 environment many ways, we recommend the following technique. DDEV creates a .env.local file for you by default; if you already have one DDEV adds necessary information to it. When ddev composer create-project asks if you want to include Docker configuration, answer x, as this approach does not use their Docker configuration.

Create the project directory and configure DDEV:

mkdir-pmy-shopware-site&&cdmy-shopware-site
ddevconfig--project-type=shopware6--docroot=public

Start DDEV (this may take a minute):

ddevstart

Install Shopware via Composer:

ddevcomposercreate-projectshopware/production
# If it asks `Do you want to include Docker configuration from recipes?`
# answer `x`, as we're using DDEV for this rather than its recipes.

Run Shopware installation and launch:

ddevexecconsolesystem:install--basic-setup
ddevlaunch/admin
# Default username and password are `admin` and `shopware`

Log into the admin site (/admin) using the web browser. The default credentials are username admin and password shopware. You can use the web UI to install sample data or accomplish many other tasks.

For more advanced tasks like adding elasticsearch, building and watching storefront and administration, see susi.dev.

Silverstripe CMS

Use a new or existing Composer project, or clone a Git repository.

Create the project directory and configure DDEV:

mkdir-pmy-silverstripe-composer-site&&cdmy-silverstripe-composer-site
ddevconfig--project-type=silverstripe--docroot=public

Start DDEV (this may take a minute):

ddevstart

Install Silverstripe via Composer:

ddevcomposercreate-project--prefer-distsilverstripe/installer
ddevsakedev/buildflush=all

Launch the admin area:

ddevlaunch/admin
gitclone<my-silverstripe-repo>my-silverstripe-git-site
cdmy-silverstripe-git-site
ddevconfig--project-type=silverstripe--docroot=public
ddevstart
ddevcomposerinstall
ddevsakedev/buildflush=all

Your Silverstripe CMS project is now ready. The CMS can be found at /admin, log into the default admin account using admin and password.

Visit the Silverstripe CMS user documentation and developer documentation for more information.

ddev sake can be used as a shorthand for the Silverstripe CLI command ddev exec vendor/bin/sake.

To open the CMS directly from CLI, run ddev launch /admin.

Statamic

Use a new or existing Composer project, or clone a Git repository.

The Laravel project type can be used for Statamic like it can for Laravel. DDEV automatically updates or creates the .env file with the database information.

Create the project directory and configure DDEV:

mkdir-pmy-statamic-composer-site&&cdmy-statamic-composer-site
ddevconfig--project-type=laravel--docroot=public

Install Statamic via Composer:

ddevcomposercreate-project--prefer-diststatamic/statamic

Create admin user and launch:

ddevphppleasemake:useradmin@example.com--password=admin1234--super--no-interaction
ddevlaunch/cp
gitclone<my-statamic-repo>my-statamic-git-site
cdmy-statamic-git-site
ddevconfig--project-type=laravel--docroot=public
ddevstart
ddevcomposerinstall
ddevexec"php artisan key:generate"
ddevlaunch/cp

Sulu

Create the project directory and configure DDEV:

mkdir-pmy-sulu-site&&cdmy-sulu-site
ddevconfig--project-type=php--docroot=public--upload-dirs=uploads--database=mysql:8.0

Start DDEV (this may take a minute):

ddevstart

Install Sulu via Composer:

ddevcomposercreate-projectsulu/skeleton

Create your default webspace configuration mv config/webspaces/website.xml config/webspaces/my-sulu-site.xml and adjust the values for <name> and <key> so that they are matching your project:

<?xmlversion="1.0"encoding="utf-8"?>
<webspacexmlns="http://schemas.sulu.io/webspace/webspace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.sulu.io/webspace/webspace http://schemas.sulu.io/webspace/webspace-1.1.xsd">
<!--See:http://docs.sulu.io/en/latest/book/webspaces.htmlhowtoconfigureyourwebspace-->

<name>MySuluSite</name>
<key>my-sulu-site</key>

Alternatively, use the following commands to adjust the values for <name> and <key> to match your project setup:

Configure webspace settings:

exportSULU_PROJECT_NAME="My Sulu Site"
exportSULU_PROJECT_KEY="my-sulu-site"
exportSULU_PROJECT_CONFIG_FILE="config/webspaces/my-sulu-site.xml"
ddevexec"mv config/webspaces/website.xml ${SULU_PROJECT_CONFIG_FILE}"
ddevexec"sed -i -e 's|<name>.*</name>|<name>${SULU_PROJECT_NAME}</name>|g' -e 's|<key>.*</key>|<key>${SULU_PROJECT_KEY}</key>|g' ${SULU_PROJECT_CONFIG_FILE}"

Caution

Changing the <key> for a webspace later on causes problems. It is recommended to decide on the value for the key before the database is build in the next step.

Build the database with the dev argument (adds user admin with password admin):

ddevdotenvset.env.local--app-env=dev--database-url="mysql://db:db@db:3306/db?serverVersion=8.0&charset=utf8mb4"
ddevexecbin/adminconsolesulu:builddev--no-interaction

Launch Sulu (login with admin and admin):

ddevlaunch/admin

Tip

If you don’t want to add an admin user use the prod argument instead

ddevexecutebin/adminconsolesulu:buildprod

Symfony

There are many ways to install Symfony, here are a few of them based on the Symfony docs.

DDEV automatically updates or creates the .env.local file with the database information.

Create the project directory and configure DDEV:

mkdir-pmy-symfony-composer-site&&cdmy-symfony-composer-site
ddevconfig--project-type=symfony--docroot=public

Start DDEV (this may take a minute):

ddevstart

Install Symfony via Composer:

ddevcomposercreate-projectsymfony/skeleton
ddevcomposerrequirewebapp
# When it asks if you want to include docker configuration, say "no" with "x"

Launch the site:

ddevlaunch
mkdir-pmy-symfony-cli-site&&cdmy-symfony-cli-site
ddevconfig--project-type=symfony--docroot=public
ddevstart
ddevexecsymfonycheck:requirements
ddevexecsymfonynewtemp--webapp
# 'symfony new' can't install in the current directory right away,
# so we use 'rsync' to move the installed files one level up
ddevexec'rsync -rltgopD temp/ ./ && rm -rf temp'
ddevlaunch
gitclone<my-symfony-repo>my-symfony-git-site
cdmy-symfony-git-site
ddevconfig--project-type=symfony--docroot=public
ddevstart
ddevcomposerinstall
ddevlaunch

Want to run Symfony Console (bin/console)?

ddevconsolelist
# ddev console doctrine:schema:update --force

Consuming Messages (Running the Worker)

Edit .ddev/config.yaml in your project directory and uncomment post-start hook to see messenger:consume command logs, and run:

ddevexecsymfonyserver:log

Tempest

Create the project directory and configure DDEV:

PROJECT_NAME=my-tempest-site
mkdir-p${PROJECT_NAME}&&cd${PROJECT_NAME}
ddevconfig--project-type=php--docroot=public--php-version=8.5--omit-containers=db

Start DDEV (this may take a minute):

ddevstart

Install Tempest via Composer:

ddevcomposercreate-projecttempest/app

Launch the site:

ddevlaunch

TYPO3

Create the project directory and configure DDEV:

PROJECT_NAME=my-typo3-site
mkdir-p${PROJECT_NAME}&&cd${PROJECT_NAME}
ddevconfig--project-type=typo3--docroot=public

Start DDEV (this may take a minute):

ddevstart

Install TYPO3 via Composer:

ddevcomposercreate-project"typo3/cms-base-distribution:^14"

Run the TYPO3 setup:

ddevtypo3setup\
--admin-user-password="Demo123*"\
--driver=mysqli\
--create-site=https://${PROJECT_NAME}.ddev.site\
--server-type=other\
--dbname=db\
--username=db\
--password=db\
--port=3306\
--host=db\
--admin-username=admin\
--admin-email=admin@example.com\
--project-name="My TYPO3 site"\
--force

Launch the site:

ddevlaunch/typo3/

This example uses a clone of a test repository, github.com/ddev/test-typo3.git. Replace that with your git repository.

PROJECT_GIT_URL=https://github.com/ddev/test-typo3.git
PROJECT_NAME=my-typo3-site
mkdir-p${PROJECT_NAME}&&cd${PROJECT_NAME}
gitclone${PROJECT_GIT_REPOSITORY}.
ddevconfig--project-type=typo3--docroot=public
ddevstart
ddevcomposerinstall
ddevexectouchpublic/FIRST_INSTALL
ddevlaunch/typo3/install.php

Wagtail (Python, Generic)

Wagtail is a popular, open-source content management system built on the Django web framework. This quickstart demonstrates how to set up a new Wagtail project using DDEV with Python and a virtual environment.

Create the project directory and configure DDEV:

exportWAGTAIL_SITENAME=my-wagtail-site
mkdir-p${WAGTAIL_SITENAME}&&cd${WAGTAIL_SITENAME}
ddevconfig--project-type=generic--webserver-type=generic\
--webimage-extra-packages=python3-pip,python3-venv\
--web-environment-add=DJANGO_SETTINGS_MODULE=mysite.settings.dev\
--omit-containers=db

Configure the container to automatically activate the Python virtual environment:

cat<<'DOCKERFILEEND' >.ddev/web-build/Dockerfile.python-venv
RUN for file in /etc/bash.bashrc /etc/bash.nointeractive.bashrc; do \
 echo '[ -s "$DDEV_APPROOT/env/bin/activate" ] && source "$DDEV_APPROOT/env/bin/activate"' >> "$file"; \
 done
DOCKERFILEEND

Start DDEV (this may take a minute):

ddevstart

Create a Python virtual environment and install Wagtail:

ddevexecpython-mvenvenv
ddevexecpipinstallwagtail

Initialize the Wagtail project:

ddevexecwagtailstartmysite.
ddevexecpipinstall-rrequirements.txt

Configure Django to detect HTTPS behind the Traefik router:

ddevexec"echo \"SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')\" >> mysite/settings/dev.py"

Run database migrations and create a superuser:

ddevexecpythonmanage.pymigrate--noinput
ddevexec"DJANGO_SUPERUSER_PASSWORD=admin python manage.py createsuperuser --username=admin --email=admin@example.com --noinput"

Configure DDEV to run the Wagtail development server:

cat<<'EOF' > .ddev/config.wagtail.yaml
web_extra_daemons:
 - name: "wagtail"
 command: "python manage.py runserver 0.0.0.0:8000"
 directory: /var/www/html
web_extra_exposed_ports:
 - name: "wagtail"
 container_port: 8000
 http_port: 80
 https_port: 443
EOF

Restart DDEV to apply the configuration:

ddevrestart

Launch the Wagtail admin interface (login with admin and admin):

ddevlaunch/admin

WordPress

There are several easy ways to use DDEV with WordPress:

DDEV has built-in support for WP-CLI, the command-line interface for WordPress.

Create the project directory and configure DDEV:

mkdir-pmy-wp-cli-site&&cdmy-wp-cli-site
# Create a new DDEV project inside the newly-created folder
# (Primary URL automatically set to `https://<folder>.ddev.site`)
ddevconfig--project-type=wordpress

Start DDEV (this may take a minute):

ddevstart

Download WordPress:

ddevwpcoredownload

Install WordPress (or use ddev launch to install via browser):

# You can launch in browser to finish installation:
# ddev launch
# OR use the following installation command
# (we need to use single quotes to get the primary site URL from `.ddev/config.yaml` as variable)
ddevwpcoreinstall--url='$DDEV_PRIMARY_URL'--title='My WordPress site'--admin_user=admin--admin_password=admin--admin_email=admin@example.com

Launch WordPress admin dashboard:

ddevlaunchwp-admin/

Bedrock is a modern, Composer-based installation in WordPress:

mkdir-pmy-wp-bedrock-site&&cdmy-wp-bedrock-site
ddevconfig--project-type=wp-bedrock
ddevstart
ddevcomposercreate-projectroots/bedrock

DDEV automatically manages the .env file with the correct database credentials and WP_HOME URL. No manual .env configuration is needed.

You can then run:

ddevwpcoreinstall--url='$DDEV_PRIMARY_URL'--title='My Bedrock Site'--admin_user=admin--admin_password=admin--admin_email=admin@example.com
ddevlaunch/wp/wp-admin/

For more details, see Bedrock installation.

To get started using DDEV with an existing WordPress project, clone the project’s repository.

PROJECT_GIT_URL=https://github.com/ddev/test-wordpress.git
gitclone${PROJECT_GIT_URL}my-wp-git-site
cdmy-wp-git-site
ddevconfig--project-type=wordpress
ddevstart
ddevwpcoreinstall--url='$DDEV_PRIMARY_URL'--title='My WordPress site'--admin_user=admin--admin_password=admin--admin_email=admin@example.com
ddevlaunchwp-admin/

You’ll see a message like:

An existing user-managed wp-config.php file has been detected! Project DDEV settings have been written to:

/Users/rfay/workspace/bedrock/web/wp-config-ddev.php

Comment out any database connection settings in your wp-config.php file and add the following snippet to your wp-config.php, near the bottom of the file and before the include of wp-settings.php:

// Include for DDEV-managed settings in wp-config-ddev.php.
$ddev_settings = __DIR__ . '/wp-config-ddev.php';
if (is_readable($ddev_settings) && !defined('DB_USER')) {
require_once($ddev_settings);
}

If you don’t care about those settings, or config is managed elsewhere (like in a .env file), you can eliminate this message by adding a comment to wp-config.php:

// wp-config-ddev.php not needed

Now run ddev start and continue Importing a Database if you need to.