Install Contao

This article is machine translated.

After you have checked all requirements and set up your web server, you can now start the installation.

There are two ways to install Contao on your server, using the graphical user interface of the ContaoManager or using the command line.

Installation with the Contao Manager

Install Contao Manager

Before you can install Contao on your server, you need to install and configure the Contao Manager.

Installing Contao with the Contao Manager

After the successful basic configuration, you can now install Contao. Select the desired version and the initial configuration and click the “Finish” button.

Installing Contao with Contao Manager

The installation can now take several minutes. Details about the installation process can be displayed by clicking the following iconShow/Hide Console Output.

Contao is installed

Update database tables

Once the Contao Manager has installed all packages, you have to run the Contao install tool to update the database.

Installation via the command line {#installation-over-the-command line}

When installing from the command line, create-projecta composer updatecommand is executed during the installation. This will cause some hosters not to be able to terminate the process due to high system load, and the installation will fail. In this case you should use theContao Manager.

You have logged on to your server with your user name and domain.

ssh benutzername@example.com

Change to the public directory of your web hosting.

cd www

Install Composer

Composer is an application-oriented package manager for the PHP programming language and installs dependencies.

To install Composer, please follow the instructions on the Composer website and copy the commands from there, because the SHA hash used to verify the download changes with each version of Composer. At this point, the commands look like this.

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

Installing Contao from the command line {#install Contao from the command line}

In the second step, you install Contao using the Composer. “example” stands for the desired installation directory and 4.8 for the version of Contao you want to install.

php composer.phar create-project contao/managed-edition example 4.8

Hosting Configuration

In Contao, all publicly accessible files are located in the subfolder /webof the installation. Use the admin panel of the hosting provider to set the document root of the installation to this subfolder and create a database on this occasion.

Example: example.compoints to the directory /www/example/web

Pro Contao installation therefore requires its own (sub)domain.

Update database tables

After the installation is before the database update, call the Contao install tool or use (from Contao 4.9)

php vendor/bin/contao-console contao:migrate

on the command line.