Installing TYPO3 with DDEV
This guide provides step-by-step instructions for installing TYPO3 using DDEV and Composer.
If DDEV is not yet installed on your local machine, see Installing and using DDEV.
DDEV is intended for local development only. To deploy your TYPO3 site to a production server, see: Deploying TYPO3.
Throughout the Getting Started Tutorial, we assume that you are running TYPO3 locally with DDEV and have installed it using Composer.
For an overview of alternative installation methods, see the TYPO3 installation overview in the TYPO3 Explained manual.
Table of contents
Quick Start: TYPO3 Installation with DDEV
The following commands will create a new TYPO3 project, initialize DDEV, install TYPO3 via Composer, and run the setup. Copy and paste them into your terminal.
# Create project directory
mkdir my_project && cd my_project
# Initialize DDEV project
ddev config --php-version 8.4 --docroot public --project-type typo3
# Start DDEV
ddev start
# Install TYPO3 via Composer
ddev composer create "typo3/cms-base-distribution:^13"
# Run TYPO3 CLI setup (database credentials are pre-filled)
ddev typo3 setup --server-type=other --driver=mysqli --host=db --port=3306 --dbname=db --username=db --password=db
# Open the Backend login in a browser
ddev launch /typo3/
Next steps: TYPO3 setup on first installation
Note
The directory that you run these commands in must be empty. Do not initialize Git or open the folder in an IDE before running the commands, as these may create files in the directory (for example hidden files).
Step-by-step: TYPO3 Installation with DDEV
Video: Installing TYPO3 with DDEV
The video demonstrates how to install TYPO3 v11 LTS with DDEV.
Although TYPO3 v11 is outdated, the installation process is largely the same for newer versions.
Create the installation directory
Create an empty directory for your TYPO3 project and change into it:
mkdir my_project
cd my_project
Note
The directory where you run the following commands must be empty.
Do not initialize Git or open the folder in an IDE before running the commands, as these may create files in the directory (for example hidden files).
Create a New DDEV Project
Initialize a new DDEV project. The ddev config
command will prompt you for details of your setup.
TYPO3 is included in the list of preconfigured project types.
ddev config --php-version 8.4 --docroot public --project-type typo3
- Docroot Location
-
The docroot is the folder containing the files accessible to the webserver, including the entry point
index.
. It is commonly namedphp public
.Do not change the docroot during this installation process. You can change it later if necessary, however most guides assume your docroot is called
public
. - Project Type
- Always set the project type to
typo3
.
Start the DDEV
Start the DDEV project:
ddev start
The webserver environment is now running, but TYPO3 is not yet installed.
Install TYPO3
Install TYPO3 using Composer:
ddev composer create "typo3/cms-base-distribution:^13"
You now have a Composer-based TYPO3 installation.
Directory structure after composer installation
At this point, your project folder should contain the following files and directories:
~/projects/typo3/sites/my_project$ ls -a
composer.json composer.lock config .ddev .gitignore LICENSE packages public README.md vendor
Additional folders like var
and subfolders like
config/
will be created during the setup process.
Next steps: Setup TYPO3
At this point, important files and folders are still missing, and your database does not yet contain any tables.
All of these will be created during the setup process. For detailed instructions, see: TYPO3 setup on first installation