To run Contao successfully, the web server must meet these system requirements. Contao was originally developed for the familiar LAMP stack, but runs on any web server that provides a current version of PHP and MySQL.
The minimum requirements depend on whether you are installing the latest or the Long Term Support version. All maintained versions of Contao are compatible with the latest PHP and MySQL versions. Therefore, we recommend to always use them.
|Extension Name||Contao 4.4||Contao 4.9|
||recommended1||requires GD, Imagick or Gmagick1|
||recommended1||requires GD, Imagick or Gmagick1|
1 Contao automatically selects an image processing library depending on its availability. However, the PHP GD library must still be available. Using ImageMagick via the PHP Imagick or Gmagick library is recommended in all cases. ImageMagick offers better performance and quality. To find out which library is actually used by Contao, the following command can be executed:
$ vendor/bin/contao-console debug:container contao.image.imagine
All required extensions are enabled by default in current PHP versions. However, some hosting providers explicitly disable them. The requirements are automatically checked during installation via the Contao Manager or Composer.
These are the recommended settings for the ideal operation of Contao. A different configuration does not mean that Contao does not work, but may cause unexpected behavior or performance degradation/slow reactions.
|Configuration Name||Web Process||Command Line||Notes|
||not applicable||May need to be increased if many extensions are installed. Increase if the user access rights cannot be saved correctly.|
||Disabling the opcode cache has a significant negative impact on performance.|
||not applicable||A lower value may cause an unnecessary slowdown.|
||If active, make sure that the system’s temporary directory can be accessed.|
InnoDB(default since MySQL 5.7)
innodb_large_prefix = 1(enabled by default since MySQL 5.7.7)
innodb_file_format = Barracuda(not necessary any more since MySQL 8.0)
innodb_file_per_table = 1(enabled by default since MySQL 5.6.7)
ext-gd), Imagick (
ext-imagick) or Gmagick (
ext-gmagick). Contao automatically detects and uses the best available extension.
ext-gd) is required for image processing.
If a MySQL server in version 8.0.17 or higher is used, at least PHP 7.2.0 is required.
In case you want to switch the PHP version of an already running PHP instance, you should always run a full
composer update after
switching. This is especially important when switching between major versions, e.g. from PHP 7.x to 8.x - or vice versa. This ensures
compatibility of your installed packages with the respective PHP version, since each package (including Contao itself, installed Contao
extensions and other third-party packages) can require specific PHP versions and PHP extensions that it needs and is known to be compatible
In case you are using the Contao Manager, you can run the
composer update process in the maintenance section under Composer Dependencies:
Although Contao uses the Doctrine DBAL database abstraction layer, no database server types other than MySQL (or a compatible fork like MariaDB) are currently supported.
Contao has been successfully tested on MySQL servers version 5.1 / 5.5 with
MyISAM table format. The use of
utf8_general_* instead of the
utf8mb4 character set results in a worse UTF8 support (e.g. no emojis).
If the above recommended options cannot be enabled on your server, please configure another
database engine and a different character set in your
As of Contao 4.8, you can find the file under
doctrine: dbal: connections: default: default_table_options: charset: utf8 collate: utf8_unicode_ci
It is further recommended to run MySQL in “strict mode” to prevent corrupt or truncated data and to guarantee data integrity.
As of Contao 4.9, the install tool shows a warning if the database server is not running in strict mode.
To enable it, add the following to your
my.ini file or make sure that the
setting is adjusted accordingly:
[mysqld] … sql_mode="TRADITIONAL" …
If the setting cannot be enabled on your server, please configure the connection
options in your
app/config/config.yml file (
doctrine: dbal: connections: default: options: # Depending on the DB driver, the option key is either 1002 (pdo_mysql) or 3 (mysqli) 1002: "SET SESSION sql_mode=(SELECT CONCAT(@@sql_mode, ',TRADITIONAL'))"
TRADITIONAL SQL mode is a combination mode consisting of
several SQL modes like
STRICT_ALL_TABLES among others. The “Strict SQL Mode”
is active when either
STRICT_ALL_TABLES is enabled. Strict mode (specifically
STRICT_TRANS_TABLES) is enabled
by default in current versions of MySQL as well as MariaDB. However, many shared hosting environments use different settings. The advantage
of strict mode is that erroneous database operations will actually cause an error instead of being silently ignored by the database server,
leading to better data integrity and security.
Modern hosting environments of today allow customers to access their account via an SSH terminal. This is not only a more secure connection than traditional unencrypted FTP, but also allows efficient debugging and the development of the application.
It is recommended to use PHP-FPM or a similar FastCGI setup for the PHP stack. Contao can
perform background tasks (such as indexing the page content) without the browser waiting for the response by using
In Contao, all publicly accessible files are located in the
web/ subfolder of the installation. Set the
document root of the installation via the admin panel of the hosting provider to this subfolder and set up a database
on this occasion.
example.com points to the directory
Following the Symfony standard, the public subfolder of
/web has been renamed to
/public. If there is a
/web directory in your installation, Contao will automatically use it instead of
Therefore, a separate (sub)domain is required for each Contao installation.
There are a few major Internet service providers that offer special settings for running Contao. Fortunately, they are only the exception to the rule. The provider-specific settings can be found in the German Contao forum. You can get optimal hosting packages for Contao from the Contao partners in the service category “Web hosting”.