Installing TYPO3 with DDEV

This is a step-by-step guide detailing how to install TYPO3 using DDEV, Docker and Composer.

DDEV is used for local development only.

The scripts used in this guide will install TYPO3 v13.1 which is the latest release of the CMS. If you wish to install the long term support (LTS) release of TYPO3, visit the TYPO3 v12 Installation instructions.

Pre-Installation Checklist

  1. Install Docker - Visit docker.com to download and install the recommended version of Docker for your operating system.
  2. Install DDEV - Follow the DDEV installation guide to install DDEV.

DDEV and Docker need to be installed on your local machine before TYPO3 can be installed. If you need help installing DDEV, support can be found on the DDEV Discord server.

Create the Installation Directory

Create an empty directory to install TYPO3 in and then change into that directory:

mkdir t3example
cd t3example
Copied!

Create a new DDEV Project

The ddev config command will prompt for information about your project. TYPO3 is in the list of preconfigured projects.

ddev config --php-version 8.3

# Give the following answers when prompted:

Project name (t3example):

Docroot Location (current directory): public

Project Type [php, typo3, ...] (php): typo3
Copied!
Docroot Location
Is the folder containing files that have to be reached by the webserver. It contains the vital entry point index.php. The folder is commonly called public.
Project Type
Should always be "typo3"

Alternatively you can skip the prompt by supplying all of the required parameters in a single command:

ddev config  --project-type=typo3 --docroot=public --php-version 8.3
Copied!

Start the project

ddev start
Copied!

The webserver is now running but TYPO3 is not yet installed.

Install TYPO3

ddev composer create "typo3/cms-base-distribution:^13"
Copied!

You now have a Composer-based TYPO3 installation.

Run the Installation Setup Tool

Setup TYPO3 in the console

New in version 12.1

Starting with TYPO3 12.1 a new CLI command setup is introduced as an alternative to the existing GUI-based web installer.

Interactive / guided setup (questions/answers):

ddev typo3 setup
Copied!

When prompted give the following answers to work with the default DDEV configuration:

Which web server is used?
> other

Database driver?
> mysqli

Enter the database "username" [default: db] ? db

Enter the database "password" ? db

Enter the database "port" [default: 3306] ? 3306

Enter the database "host" [default: db] ? db

Select which database to use:
> db
Copied!

Setup TYPO3 with the 1,2,3 Install Tool in the browser

Create a file called FIRST_INSTALL in your webroot

ddev exec touch public/FIRST_INSTALL
Copied!

Open the installer

ddev launch /typo3/install.php
Copied!

Go to the TYPO3 backend:

ddev launch /typo3
Copied!

And login with the credentials you just provided.

Managing the Database

ddev start automatically created a database for you. DDEV also created the file config/system/additional.php in which it configured the database credentials for you.

Many database browsers, including phpMyAdmin, are available to let you browse the database, see Database GUIs <https://ddev.readthedocs.io/en/stable/users/usage/database-management/#database-guis/>__

Sending E-Mail

DDEV creates configuration in config/system/additional.php to capture sent mails. You can see what mails have been sent here:

ddev launch -m
Copied!

Stopping a DDEV Instance

If you want to stop all projects from running you can call:

ddev poweroff
Copied!

The projects will stay configured and databases will be persisted.

Deleting a DDEV Instance

If you want to delete the project you just created you can remove it by calling the following command in your new projects root folder:

ddev delete --omit-snapshot
Copied!

This will remove all containers from the project and delete the database.

Afterwards you can safely delete the project's root folder.

DDEV Documentation

You will want to visit DDEV's documentation <https://ddev.readthedocs.io/>__, which also has a TYPO3 Quick Start <https://ddev.readthedocs.io/en/stable/users/quickstart/#typo3/>__ which parallels this one.