---
title: "Initial deployment"
manual: "TYPO3 Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3coreapi:manual-deployment-initial@main"
source: "Administration/Deployment/InitialDeployment/Index.rst"
modified: "2026-09-15T12:49:12+00:00"
---

# Initial deployment

This is the first deployment of TYPO3 to a production environment. It includes
setting up the full application, database, and user-generated content.

Steps:

## Build the project locally:

```bash
composer install --no-dev
```

## Export the local database

Export the local database using [mysqldump](https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html),
[ddev export-db](https://ddev.readthedocs.io/en/stable/users/cli-usage/),
or a GUI-based tool like Heidi SQL or phpmyadmin.

**Linux / macOS / WSL**

```bash
mysqldump -u <user> -p -h <host> <database_name> > dump.sql
```

**DDEV**

```bash
ddev export-db --file=dump.sql
```

The database credentials can either be entered during the installation process
using the Install Tool, or manually adjusted later in the file `config/system/settings.php`.

## Transfer all necessary files to the server

Folders to include:

-   `public/`
-   `config/`
-   `vendor/`,
-   Files from the project directory: `composer.json`, `composer.lock`

You can speed up the transfer using archive tools like zip or tar, or use
[rsync](https://docs.typo3.org/permalink/t3coreapi:deployment-rsync@main).

## Import the database on the production server

For example using
[mysql](https://dev.mysql.com/doc/refman/8.0/en/mysql.html):

```bash
mysql -u <user> -p -h <host> <database_name> < dump.sql
```

> [!NOTE]
> You will be prompted to enter the MySQL user password. Make sure the
> target database exists before running this command.

## Set up shared and writable directories on the server:

-   `public/fileadmin/`
-   `var/`

## Update web server configuration:

-   Set the document root to `public/`
-   Ensure correct permissions for writable folders

## Flush TYPO3 caches:

```bash
./vendor/bin/typo3 cache:flush
```

> [!NOTE]
> You can use the [Install Tools](https://docs.typo3.org/m/typo3/tutorial-getting-started/main/en-us/Concepts/Backend/SystemMaintainerArea/Index.html#admin-tools)
> to verify folder permissions and environment compatibility.
> Open: `https://example.org/typo3/install.php` and go to
> the **System > Environment** module.
