Directory structure
The overview below describes the directory structure in a typical Composer-based TYPO3 installation. For the structure in a legacy installation see Legacy installations: Directory structure.
Also see Environment for further information, especially how to retrieve the paths within PHP code.
Files on project level
On the top-most level, the project level, you can find the files
composer.
which contains requirements for the TYPO3 installation
and the composer.
which contains information about the concrete
installed versions of each package.
Directories in a typical project
config/
TYPO3 configuration directory. This directory contains installation-wide configuration.
config/sites/
The folder config/
contains subfolders for each site.
The following files are processed:
config.
for the site configurationyaml settings.
for the site settingsyaml csp.
for a site-specific Content Security Policyyaml
config/system/
The folder config/
contains the installation-wide
configuration files:
settings.
: Configuration written by the Admin Tools > Settings backend modulephp additional.
: Manually created file which can override settings fromphp settings.
filephp
These files define a set of global settings stored in a global array called $GLOBALS['TYPO3_CONF_VARS'].
This path can be retrieved from the Environment API, see getConfigPath().
Changed in version 12.0
For Composer-based installations the configuration files have been moved and renamed:
public/
is now available intypo3conf/ Local Configuration. php config/
system/ settings. php public/
is now available intypo3conf/ Additional Configuration. php config/
system/ additional. php
packages/
If you installed TYPO3 using the base distribution composer create "typo3/
this folder is automatically created and registered as repository in the the composer.
.
You can put your site package and other extensions to be installed locally here. Then you can just
install the extension with composer install myvendor/
.
If you did not use the base-distribution, create the directory and add it to your repositories manualy:
{
"name": "myvendor/my-project",
"repositories": [
+ {
+ "type": "path",
+ "url": "packages/*"
}
],
"...": "..."
}
public/
This folder contains all files that are publicly available. Your webserver's web root must point here.
This folder contains the main entry script index.
created by Composer
and might contain publicly available files like a robots.
and
files needed for the server configuration like a .htaccess
.
If required, this directory can be renamed by setting extra > typo3/
in the composer.json, for example to web
:
{
"extra": {
"typo3/cms": {
"web-dir": "web"
}
},
"...": "..."
}
This directory contains the following subdirectories:
public/_assets/
This directory includes symlinks to resources of extensions (stored in the
Resources/
folder), as consequence of this and further structure
changes the folder typo3conf/
is not created or used anymore.
So all files like CSS, JavaScript, icons, fonts, images, etc. of extensions
are not referenced anymore directly to the extension folders but to the
directory _assets/
.
Note
TYPO3 v12 requires typo3/
in version
5. Therefore the publicly available files provided by
extensions are now always referenced via this directory.
Tip
When creating an extension without a Resources/
folder, the
corresponding _assets/
folder for that extension can not be symlinked
as the extension's Resources/
folder does not exist. When you
create it later after the installation of the extension, run a
composer dumpautoload
and the Resources/
folder for
that extension is symlinked to _assets/
.
Warning
The _assets/
directory is not meant to be manually changed. Also, it
is important for local development that all its subdirectories are symlinks
to the specific Composer packages. Do not synchronize this directory
from a production instance back to your development instance (only the other
way round). Thus, the whole _assets/
directory should always be removable and
can be re-created with proper contents via composer dumpautoload
.
This will create symlinks for all installed TYPO3 Composer packages containing public
assets.
If the _assets/
directory would not contain symlinks, any Composer update
would never refer to updated versions of any JavaScript and CSS assets
(including TYPO3 backend system extension), leading to incompatible code
being loaded and causing errors in both backend and frontend.
public/fileadmin/
This is a directory in which editors store files. Typically images, PDFs or video files appear in this directory and/or its subdirectories.
Note this is only the default editor's file storage. This directory
is handled via the FAL API internally, there may be
further storage locations configured outside of fileadmin/
, even
pointing to different servers or using 3rd party digital asset management
systems.
Depending on the configuration in
$GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir']
another folder name than fileadmin/
can be in use.
Note
This directory is meant for editors! Integrators should not locate frontend website layout related files in here: Storing HTML templates, logos, CSS and similar files used to build the website layout in here is considered bad practice. Integrators should locate and ship these files within a project specific extension.
public/typo3/
If
typo3/cms-install
is installed, this directory contains the PHP
file for accessing the install tool (public/
).
Changed in version 14.0
The TYPO3 backend entry point PHP file public/
has
been removed. The backend can be accessed via the Backend entry point.
public/typo3temp/
Directory for temporary files. It contains subdirectories (see below) for temporary files of extensions and TYPO3 components.
Attention
Although it is a most common understanding in the TYPO3 world that
public/
can be removed at any time, it is considered
bad practice to remove the whole folder. Developers should selectively
remove folders relevant to the changes made.
public/typo3temp/assets/
The directory typo3temp/
contains temporary files that should be
public available. This includes generated images and compressed CSS and
JavaScript files.
var/
Directory for temporary files that contains private files (e.g. cache and logs files) and should not be publicly available.
Attention
Although it is a most common understanding in the TYPO3 world that
var/
can be removed at any time, it is considered
bad practice to remove the whole folder. Developers should selectively
remove folders relevant to the changes made.
var/cache/
This directory contains internal files needed for the cache.
var/labels/
The directory var/
is for extension
localizations. It contains all downloaded translation files.
This path can be retrieved from the Environment API, see getLabelsPath().
var/log/
This directory contains log files like the TYPO3 log, the deprecations log and logs generated by extensions.
vendor/
In this directory, which lies outside of the webroot, all extensions (system, third-party and custom) are installed as Composer packages.
The directory contains folders for each required vendor and inside each vendor directory there is a folder with the different project names.
For example the system extension core
has the complete package name
typo3/
and will therefore be installed into the directory
vendor/
. The extension news
, package name
georgringer/
will be installed into the folder
vendor/
.
Never put or symlink your extensions manually into this directory as it is
managed by Composer and any manual changes are getting lost,
for example on deployment. Local extensions and sitepackages
should be kept in a separate folder outside the web root, for example
packages.
Upon installation , Composer creates a symlink from packages to
vendor/
.