---
title: "ext_emconf.php"
manual: "TYPO3 Explained"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:ext-emconf-php@13.4"
source: "ExtensionArchitecture/FileStructure/ExtEmconf.rst"
rendered: "2026-10-05T17:28:20+00:00"
---

# `ext_emconf.php` {#ext-emconf-php}

*required* in Classic mode installations, for functional tests and to upload an
extension to the TER (TYPO3 Extension Repository)

-   **ext_emconf.php**

    -   *Scope:* extension
    -   *Path (Composer):* packages/my_extension/ext_emconf.php
    -   *Path (Classic):* typo3conf/ext/my_extension/ext_emconf.php

    The `ext_emconf.php` is used in
    [Classic mode installations not based on Composer](https://docs.typo3.org/permalink/t3coreapi:classic-installation@13.4) to
    supply information about an extension in the **Admin Tools > Extensions**
    module. In these installations the ordering of installed extensions and their
    dependencies are loaded from this file as well.

It is also needed for [Writing functional tests](https://docs.typo3.org/permalink/t3coreapi:testing-writing-functional@13.4)
with the `typo3/testing-framework <https://github.com/TYPO3/testing-framework>` in v8 and
earlier.

In Composer-based installations, the ordering of installed extensions and
their dependencies is loaded from the [`composer.json`](ComposerJson.md#file-extension-composer-json) file, instead of
[`ext_emconf.php`](#file-extension-ext-emconf-php)

The only content included is an associative array,
`$EM_CONF[extension key]`. The keys are described in the table below.

This file is overwritten when extensions are imported from the online
repository. So do not write your custom code into this file - only change
values in the `$EM_CONF` array if needed.

Example:

**packages/my_extension/ext_emconf.php**

```php
<?php

$EM_CONF[$_EXTKEY] = [
  'title' => 'Extension title',
  'description' => 'Extension description',
  'category' => 'plugin',
  'author' => 'John Doe',
  'author_email' => 'john.doe@example.org',
  'author_company' => 'some company',
  'state' => 'stable',
  'version' => '1.0.0',
  'constraints' => [
    'depends' => [
      'typo3' => '13.4.0-13.4.99',
    ],
    'conflicts' => [
    ],
    'suggests' => [
    ],
  ],
];

```

> [!NOTE]
> `$_EXTKEY` is set globally and contains the extension key.

> [!WARNING]
> Due to limitations of the TER ([TYPO3 Extension Repository](https://extensions.typo3.org)),
> `$_EXTKEY` must be used here and **not** a constant or a string. Furthermore the
> `ext_emconf.php` must not declare `strict_types=1`, otherwise TER upload will fail.

-   **title**

    -   *Type:* string, required

    The name of the extension in English.

-   **description**

    -   *Type:* string, required

    Short and precise description in English of what the extension does
    and for whom it might be useful.

-   **version**

    -   *Type:* string

    Version of the extension. Automatically managed by extension manager /
    TER. Format is \[int\].\[int\].\[int\]

-   **category**

    -   *Type:* string

    Which category the extension belongs to:

    -   **`be`**

        Backend (Generally backend-oriented, but not a module)

    -   **`module`**

        Backend modules (When something is a module or connects with one)

    -   **`fe`**

        Frontend (Generally frontend oriented, but not a "true" plugin)

    -   **`plugin`**

        Frontend plugins (Plugins inserted as a "Insert Plugin" content
        element)

    -   **`misc`**

        Miscellaneous stuff (Where not easily placed elsewhere)

    -   **`services`**

        Contains TYPO3 services

    -   **`templates`**

        Contains website templates

    -   **`example`**

        Example extension (Which serves as examples etc.)

    -   **`doc`**

        Documentation (e.g. tutorials, FAQ's etc.)

    -   **`distribution`**

        Distribution, an extension kick starting a full site

-   **constraints**

    -   *Type:* array

    List of requirements, suggestions or conflicts with other extensions
    or TYPO3 or PHP version. Here is how a typical setup might look:

    **packages/my_extension/ext_emconf.php**

    ```php
    <?php

    $EM_CONF[$_EXTKEY] = [
      'title' => 'Extension title',
      // ...
      'constraints' => [
        'depends' => [
          'typo3' => '13.4.0-13.4.99',
          'php' => '8.2.0-8.4.99',
        ],
        'conflicts' => [
          'tt_news' => '',
        ],
        'suggests' => [
          'news' => '12.1.0-12.99.99',
        ],
      ],
    ];

    ```

    -   **depends**

        List of extensions that this extension depends on.
        Extensions defined here will be loaded *before* the current extension.

    -   **conflicts**

        List of extensions which will not work with this extension.

    -   **suggests**

        List of suggestions of extensions that work together or
        enhance this extension.
        Extensions defined here will be loaded *before* the current extension.
        Dependencies take precedence over suggestions.
        Loading order especially matters when overriding TCA or SQL of another extension.

    The above example indicates that the extension depends on a
    version of TYPO3 between 13.4 and 13.4.x (as only bug and security fixes are
    integrated into TYPO3 when the last digit of the version changes, it is
    safe to assume it will be compatible with any upcoming version of the
    corresponding branch, thus `.99`). Also the extension has been
    tested and is known to work properly with PHP 8.2. to 8.4 It
    will conflict with "tt_news" (any version) and it is suggested
    that it might be worth installing "news" (version at least 12.1.0).
    Be aware that you should add *at least* the TYPO3 and PHP version constraints
    to this file to make sure everything is working properly.

    For Classic mode installations, the [`ext_emconf.php`](#file-extension-ext-emconf-php) file
    is the source of truth for required dependencies and the loading order
    of active extensions.

    > [!NOTE]
    > Extension authors should ensure that the information here is in sync
    > with the [`composer.json`](ComposerJson.md#file-extension-composer-json) file.
    > This is especially important regarding constraints like `depends`,
    > `conflicts` and `suggests`. Use the equivalent settings as in
    > [`composer.json`](ComposerJson.md#file-extension-composer-json) `require`, `conflict` and `suggest` to set
    > dependencies and ensure a specific loading order.

-   **state**

    -   *Type:* string

    Which state is the extension in

    -   **`alpha`**

        Alpha state is used for very initial work, basically the extension is
        during the very process of creating its foundation.

    -   **`beta`**

        Under current development. Beta extensions are functional, but not
        complete in functionality.

    -   **`stable`**

        Stable extensions are complete, mature and ready for production
        environment. Authors of stable extensions carry a responsibility to
        maintain and improve them.

    -   **`experimental`**

        Experimental state is useful for anything experimental - of course.
        Nobody knows if this is going anywhere yet...  Maybe still just an
        idea.

    -   **`test`**

        Test extension, demonstrates concepts, etc.

    -   **`obsolete`**

        The extension is obsolete or deprecated. This can be due to other
        extensions solving the same problem but in a better way or if the
        extension is not being maintained anymore.

    -   **`excludeFromUpdates`**

        This state makes it impossible to update the
        extension through the Extension Manager (neither by the update
        mechanism, nor by uploading a newer version to the installation). This
        is very useful if you made local changes to an extension for a
        specific installation and do not want any administrator to overwrite
        them.

-   **author**

    -   *Type:* string

    Author name

-   **author_email**

    -   *Type:* email address

    Author email address

-   **author_company**

    -   *Type:* string

    Author company

-   **autoload**

    -   *Type:* array

    To get better class loading support for websites in Classic mode
    the following information can be provided.

    **Extensions using namespaces and following PSR 4**

    If the extension has namespaced classes following the PSR-4 standard, then you
    can add the following to your [`ext_emconf.php`](#file-extension-ext-emconf-php) file:

    **packages/my_extension/ext_emconf.php**

    ```php
    <?php

    $EM_CONF[$_EXTKEY] = [
      'title' => 'Extension title',
      // ...
      'autoload' => [
        'psr-4' => [
          // The prefix must end with a backslash
          'Vendor\\ExtName\\' => 'Classes',
        ],
      ],
    ];

    ```

    **Extensions having one folder with classes or single files**

    It is not recommended but possible to use different name space schemes
    or no namespace at all.

    Considering you have an extension where all classes
    and interfaces reside in a `Classes` folder or single classes you can
    add the following to your [`ext_emconf.php`](#file-extension-ext-emconf-php) file:

    **packages/my_extension/ext_emconf.php**

    ```php
    <?php

    $EM_CONF[$_EXTKEY] = [
      'title' => 'Extension title',
      // ...
      'autoload' => [
        'classmap' => [
          'Classes',
          'a-class.php',
        ],
      ],
    ];

    ```

-   **autoload-dev**

    -   *Type:* array

    Same as the configuration "autoload" but it is only used if the
    *ApplicationContext* is set to *Testing*.
