---
title: "File structure"
manual: "TYPO3 Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3coreapi:extension-reserved-folders-legacy@main"
source: "ExtensionArchitecture/FileStructure/Index.rst"
rendered: "2026-09-24T12:36:55+00:00"
---

# File structure {#extension-reserved-folders-legacy}

This chapter lists the reserved file and directory names in an extension and
file naming conventions.

It should also help you find your way around
automatically-generated or example extensions and sitepackages.

The following folder and file structure is typical for a TYPO3 extension:

-   [Classes](https://docs.typo3.org/permalink/t3coreapi:extension-classes@main)
    -   ...
-   [Configuration](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-files@main)
    -   [Backend](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-backend@main)
        -   [AjaxRoutes.php](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-backend-ajaxroutes@main)
        -   [Modules.php](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-backend-modules@main)
        -   [Routes.php](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-backend-routes@main)
    -   [Extbase](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-extbase@main)
        -   [Persistence](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-extbase-persistence@main)
            -   [Classes.php](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-extbase-persistence-classes@main)
    -   [Fluid](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-fluid@main)
        -   [Namespaces.php](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-fluid-namespaces@main)
        -   [ComponentCollections.php](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-backend-component-collections@main)
    -   [TCA](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-tca@main)
        -   [Overrides](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-tca-overrides@main)
            -   \<tablename>.php
            -   ...
        -   \<tablename>.php
        -   ...
    -   [Sets](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-sets@main)
        -   \<SetIdentifier>
            -   [config.yaml (mandatory)](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-sets-config-yaml)
            -   [settings.definitions.yaml](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-sets-settings-definitions-yaml)
            -   [setup.typoscript](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-sets-setup-typoscript)
            -   ...
    -   [TsConfig](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-tsconfig@main)
        -   ...
    -   [TypoScript](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-typoscript@main)
        -   ...
        -   constants.typoscript
        -   setup.typoscript
    -   [Icons.php](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-icons-php@main)
    -   [page.tsconfig](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-page-tsconfig@main)
    -   [Services.yaml](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-services-yaml@main)
    -   [user.tsconfig](https://docs.typo3.org/permalink/t3coreapi:extension-configuration-user-tsconfig@main)
-   [Documentation](https://docs.typo3.org/permalink/t3coreapi:extension-files-documentation@main)
    -   ...
-   [Resources](https://docs.typo3.org/permalink/t3coreapi:extension-files-resources@main)
    -   [Private](https://docs.typo3.org/permalink/t3coreapi:extension-resources-private@main)
        -   [Language](https://docs.typo3.org/permalink/t3coreapi:extension-resources-private-language@main)
            -   ...
        -   Layouts
            -   ...
        -   Partials
            -   ...
        -   Templates
            -   ...
        -   ...
    -   [Public](https://docs.typo3.org/permalink/t3coreapi:extension-resources-public@main)
        -   ...
-   [Tests](https://docs.typo3.org/permalink/t3coreapi:extension-files-tests@main)
    -   Functional
        -   ...
    -   Unit
        -   ...
    -   ...
-   [composer.json](https://docs.typo3.org/permalink/t3coreapi:files-composer-json@main)
-   [ext_localconf.php](https://docs.typo3.org/permalink/t3coreapi:ext-localconf-php@main)
-   [ext_tables.sql](https://docs.typo3.org/permalink/t3coreapi:ext-tables-sql@main)

## Files {#extension-files}

An extension consists of:

1.  A directory named *extension key* (a worldwide unique
    identification string for the extension), located in `typo3conf/ext`
    for local extensions or `typo3/sysext` for system extensions.
1.  Standard files with reserved names for configuration related to TYPO3
    (most are optional, see list below)
1.  Additional files for the main extension functionality.

## Reserved file names {#extension-reserved-filenames}

Most of these files are not required, except [`composer.json`](ComposerJson.md#file-extension-composer-json).

Do not use the prefix `ext_` in your extension names as this is a reserved name.

## Reserved folders {#extension-reserved-folders}

In the early days, extension authors "baked their own bread" when it came to
PHP class file locations, public web resources and templates.

Since the rise of Extbase, a general structure for file
locations inside extensions has become established. If extension authors
stick to this and the Coding Guidelines, many things become easier. For instance, if you put
your PHP classes into a `Classes/` folder and use appropriate namespaces for the classes,
the system will autoload the files.

Extension kickstarters like the [`friendsoftypo3/extension-builder`](https://packagist.org/packages/friendsoftypo3/extension-builder)
will create the correct structure for you.
