Below, a representation of the folder structure of Contao 4 and some files commonly used.
├── app │ ├── AppKernel.php │ ├── cache │ ├── config │ └── logs ├── assets ├── files ├── system │ ├── config │ │ └── localconfig.php │ └── modules ├── templates ├── vendor │ ├── contao │ └── symfony └── web ├── .htaccess (hidden file) ├── app_dev.php ├── app.php ├── install.php └── share
This is the application folder which includes especially Symfony cache files, Symfony configuration files and log files.
assets/ contains components such as jQuery or TinyMCE. Contao CSS and JS
source files are also located in this folder as well as the combined and
minified CSS and JS files and resized images. It is available from the
folder through a symbolic link.
available from the
web/ folder through a symbolic link.
system/ contains Contao configuration files, the back end theme(s) and
templates/ contains customized templates (for more information, see the
chapter template in the manual).
This is the location of external libraries as well as the source code of Contao and Symfony. This folder also includes Contao's bundles such as the newsletter, the core, the news, etc. and bundles developed by the community.
This is the web root folder that contains public files, the front controllers and the access to the Contao install tool.
app_dev.php are the front controllers.
app.php is used in a
production environment and all the pages requested by visitors go through this
single entry point.
app_dev.php has the same goal as
app.php but for a
development environment. This mode displays a toolbar with some debugging
share/ contains shared files such as XML files (e.g. sitemaps or RSS feeds).
For security purpose, the
web/ folder should be the only one to be
accessible by visitors.
folder. If some folders must be publicly available and are located outside the
web/ folder, the system generates symbolic links (also written symlink)
for each of them. For example, the
web/assets folder is a reference that
targets the original folder
assets placed at the same level as the
Public files of each bundle are located in the
web/bundles folder through
symlinks. These can be regenerated from the back end under maintenance.
Existing extensions developed for Contao 3.5 and lower can be used with Contao
4 if they fulfill the compatibility requirements. You can see if an extension is
compatible by checking its
composer.json file in the section
contao/core-bundle":"~3.2 || ~4.1). The procedure for installing an extension
is described in the manual under the chapter extension.