Export configuration settings

In Commerce 2.2 and later pipeline deployment model, you can maintain a consistent configuration across systems. After you configure settings in the Admin on your development system, export those settings to configuration files using the following command:

bin/magento app:config:dump {config-types}

config_types is a space-separated list of config types to dump. Available types include scopes, system, themes, and i18n. If no config types are specified, the command dumps all system configuration information.

The following example dumps scopes and themes only:

bin/magento app:config:dump scopes themes

As a result of the command execution, the following configuration files are updated:

  • app/etc/config.php

    This is the shared configuration file for all your Commerce instances.
    Include this in your source control so it can be shared between the development, build, and production systems.

    See config.php reference.

  • app/etc/env.php

    This is the environment-specific configuration file.
    It contains sensitive and system-specific settings for individual environments.

    Do not include this file in source control.

    See env.php reference.

Sensitive or system-specific settings

To set the sensitive settings written to env.php, use the bin/magento config:sensitive:set command.

Configuration values are specified as either sensitive or system-specific by referencing Magento\Config\Model\Config\TypePool in the module’s di.xml file.

To export additional system settings when using config_types, consider using the bin/magento config:set command.

recommendation-more-help
386822bd-e32c-40a8-81c2-ed90ad1e198c