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:

composer install --no-dev
Copied!

Export the local database

Export the local database using mysqldump, ddev export-db, or a GUI-based tool like Heidi SQL or phpmyadmin.

mysqldump -u <user> -p -h <host> <database_name> > dump.sql
Copied!
ddev export-db --file=dump.sql
Copied!

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.

Import the database on the production server

For example using mysql:

mysql -u <user> -p -h <host> <database_name> < dump.sql
Copied!

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:

./vendor/bin/typo3 cache:flush
Copied!