---
title: "Directory structure of a typical TYPO3 project"
manual: "TYPO3 Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3coreapi:directory-structure@main"
source: "Administration/DirectoryStructure/Index.rst"
rendered: "2026-09-17T18:20:57+00:00"
---

# Directory structure of a typical TYPO3 project {#directory-structure-of-a-typical-typo3-project}

The typical directory structure of a TYPO3 installation differs fundamentally
between Composer mode and Classic mode. It can also vary depending on the TYPO3
version. Use the version switch to select the correct documentation version.

This structural difference remains even when deploying TYPO3 to a production
server without Composer, and without deploying `composer.json` or
`composer.lock`. To make matters more confusing, the presence of these
files **does not** guarantee that TYPO3 is running in Composer mode.

![The TYPO3 backend Extension Manager with message "Composer mode: The system is set to Composer mode. Please notice that this list is for informational purpose only. To modify which extensions are part of the system, use Composer. To set extensions up, use the TYPO3 cli (extension:setup)"](../../Images/ManualScreenshots/Backend/ComposerMode.png)

**Table of contents**

-   [Directories in a typical Composer mode TYPO3 project](https://docs.typo3.org/permalink/t3coreapi:directories-in-a-typical-composer-mode-typo3-project@main)
-   [Regenerating temporary folders](https://docs.typo3.org/permalink/t3coreapi:regenerating-temporary-folders@main)

> [!NOTE]
> **See also**
>
> If your installation is running in Classic mode (also called Non-Composer or
> Legacy mode), see the following for details on the directory structure:
>
> -   [Classic mode installations: Directory structure](https://docs.typo3.org/permalink/t3coreapi:classic-directory-structure@main)

## Directories in a typical Composer mode TYPO3 project {#directories-in-a-typical-composer-mode-typo3-project}

The overview below describes the directory structure of a typical
Composer-based TYPO3 installation.

Also see the chapter [Environment](https://docs.typo3.org/permalink/t3coreapi:environment@main) for details on how to retrieve paths in
PHP code.

> [!NOTE]
> Most paths listed here are configurable, as TYPO3 is highly flexible.
>
> Depending on the [deployment method](https://docs.typo3.org/permalink/t3coreapi:deployment@main),
> especially in [CI/CD automation setups](https://docs.typo3.org/permalink/t3coreapi:ci-cd-for-typo3-projects@main),
> symbolic links may be used in place of actual directories.

-   [config/](https://docs.typo3.org/permalink/t3coreapi:config@main)
-   [packages/](https://docs.typo3.org/permalink/t3coreapi:packages@main)
-   [public/](https://docs.typo3.org/permalink/t3coreapi:public@main)
-   [var/](https://docs.typo3.org/permalink/t3coreapi:var@main)
-   [vendor/](https://docs.typo3.org/permalink/t3coreapi:vendor@main)

### `config/` {#config}

TYPO3 configuration directory. This directory
contains folder `config/system/` for installation-wide configuration and
`config/sites/` for the site configuration and
[Site settings](https://docs.typo3.org/permalink/t3coreapi:sitehandling-settings@main).

#### `config/sites/` {#config-sites}

The folder `config/sites/` contains subfolders, one for each site
in the installation. See chapter [The site folder config/sites/ / typo3conf/sites/](https://docs.typo3.org/permalink/t3coreapi:site-folder@main).

#### `config/system/` {#config-system}

The folder `config/system/` contains the installation-wide
[configuration files](https://docs.typo3.org/permalink/t3coreapi:configuration-files@main):

-   `settings.php`: [Configuration](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-settings@main) written
    by the **System > Settings** backend module
-   [`additional.php`](../../Configuration/Typo3ConfVars/Index.md#file-project-config-system-additional-php): [Manually created file](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-additional@main)
    which can override settings from [`settings.php`](../../Configuration/Typo3ConfVars/Index.md#file-project-config-system-settings-php) file

These files define a set of global settings stored in a global array called
[$GLOBALS\['TYPO3_CONF_VARS'\]](https://docs.typo3.org/permalink/t3coreapi:typo3confvars@main).

This path can be retrieved from the Environment API, see
[getConfigPath()](https://docs.typo3.org/permalink/t3coreapi:environment-config-path@main).

### `packages/` {#packages}

If you installed TYPO3 using the base distribution `composer create "typo3/cms-base-distribution"`
this folder is automatically created and registered as repository in the the `composer.json`.

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/my-sitepackage`.

If you did not use the base-distribution, create the directory and add it to your repositories
manually:

**composer.json (diff)**

```diff
 {
    "name": "myvendor/my-project",
    "repositories": [
+       {
+           "type": "path",
+           "url": "packages/*"
        }
    ],
    "...": "..."
 }
```

### `public/` {#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.php` created by Composer
and might contain publicly available files like a `robots.txt` and
files needed for the server configuration like a `.htaccess`.

If required, this directory can be renamed by setting `extra > typo3/cms > web-dir`
in the composer.json, for example to `web`:

**composer.json (excerpt)**

```json
{
    "extra": {
        "typo3/cms": {
            "web-dir": "web"
        }
    },
    "...": "..."
}

```

This directory contains the following subdirectories:

#### `public/_assets/` {#public-assets}

This directory includes symlinks to resources of extensions (stored in the
`Resources/Public/` folder), as consequence of this and further structure
changes the folder `typo3conf/ext/` 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/cms-composer-installers` 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/Public/` folder, the
> corresponding `_assets/` folder for that extension can not be symlinked
> as the extension's `Resources/Public/` folder does not exist. When you
> create it later after the installation of the extension, run a
> `composer dumpautoload` and the `Resources/Public/` 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.

> [!NOTE]
> **See also**
>
> -   [Migrating and accessing public web assets from typo3conf/ext/ to public/\_assets](https://docs.typo3.org/permalink/t3coreapi:migrate-public-assets@main)
> -   [TYPO3 and Composer — we've come a long way](https://b13.com/core-insights/typo3-and-composer-weve-come-a-long-way)
> -   [Composer changes for TYPO3 v11 and v12](https://usetypo3.com/composer-changes-for-typo3-v11-and-v12.html)
> -   [Migration to typo3/composer-cms-installers version 4+](https://brotkrueml.dev/migration-typo3-composer-cms-installers-version-4/)

#### `public/fileadmin/` {#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](https://docs.typo3.org/permalink/t3coreapi:fal@main) 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'\]](https://docs.typo3.org/permalink/t3coreapi:typo3confvars-be-fileadmindir@main)
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/` {#public-typo3}

If [`typo3/cms-install`](https://packagist.org/packages/typo3/cms-install) is installed, this directory contains the PHP
file for accessing the install tool (`public/typo3/install.php`).

<!-- TODO: no Markdown rendering for "versionchanged" -->

The TYPO3 backend entry point PHP file public/typo3/index.php has
been removed. The backend can be accessed via the Backend entry point.

#### `public/typo3temp/` {#public-typo3temp}

Directory for temporary files. It contains subdirectories (see below)
for temporary files of extensions and TYPO3 components.

> [!WARNING]
> **Attention**
>
> **Do not delete the entire** `public/typo3temp/` **directory.**
>
> Removing the entire directory may lead to problems during runtime or deployment.
>
> Developers should only delete specific subfolders that are safe to remove
> and can be regenerated automatically.
>
> For proper handling and steps to safely regenerate required subdirectories,
> see: [Regenerating temporary folders](https://docs.typo3.org/permalink/t3coreapi:regeneration-temporary-folders@main) (section to be written)

##### `public/typo3temp/assets/` {#public-typo3temp-assets}

The directory `typo3temp/assets/` contains temporary files that must be
publicly accessible. This includes generated images and other temporary
frontend assets created by the TYPO3 Core.

### `var/` {#var}

Directory for temporary files that contains private files (e.g.
cache and logs files) and should not be publicly available.

> [!WARNING]
> **Attention**
>
> **Do not delete the entire** `var/` **directory.**
>
> Removing the entire directory may lead to problems during runtime or deployment.
>
> Developers should only delete specific subfolders that are relevant to the
> changes they have made and that can be safely regenerated.
>
> For more information and instructions on safely handling this directory, see:
> [Regenerating temporary folders](https://docs.typo3.org/permalink/t3coreapi:regeneration-temporary-folders@main).

#### `var/cache/` {#var-cache}

This directory contains internal files needed for the cache.

#### `var/labels/` {#var-labels}

The directory `var/labels/` is for extension
localizations. It contains all downloaded translation files.

This path can be retrieved from the Environment API, see
[getLabelsPath()](https://docs.typo3.org/permalink/t3coreapi:environment-labels-path@main).

#### `var/log/` {#var-log}

This directory contains log files like the
TYPO3 log, the deprecations log and logs generated by extensions.

### `vendor/` {#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/cms-core` and will therefore be installed into the directory
`vendor/typo3/cms-core`. The extension `news`, package name
`georgringer/news` will be installed into the folder
`vendor/georgringer/news`.

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](https://docs.typo3.org/permalink/t3coreapi:directory-packages@main).
Upon installation , Composer creates a symlink from packages to
`vendor/myvendor/my-extension`.

## Regenerating temporary folders {#regenerating-temporary-folders}

TYPO3 requires certain folders under `var/` and `public/typo3temp/`
to exist. If they are missing, the system may not function correctly.

To safely restore these folders, use one of the following methods:

### Command line: install:fixfolderstructure {#command-line-install-fixfolderstructure}

Run the following command to recreate missing directories:

```bash
vendor/bin/typo3 install:fixfolderstructure
```

### Module "Directory Status" in the "Environment" module {#module-directory-status-in-the-environment-module}

<!-- TODO: no Markdown rendering for "versionchanged" -->

This module has been moved from Admin tools to Settings.
See also: Feature: #107628 - Improved backend module naming and structure.

Alternatively, a system maintainer can go to **System > Environment > Directory Status**
and recreate the missing folders with the necessary permissions
