- env.php: used for environment config. Can’t be changed via admin.
- config.php: used for common configs that likely won’t be changed. Can’t be changed via admin
- config.xml: for module default configs.xml. Can be changed via admin.
Hierarchy for configs is shown below.
Warning signenv.php > config.php > core_config_data > config.xml
bin/magento app:config:dump command writes db config into configuration file.
Two files are updated as the result of above command:
- app/etc/config.php -> includes shared configs
- app/etc/env.php -> Includes sensitive and system-specific config
To set a config as sensitive you can use following syntax on app/etc/di.xml
Follow : @DailyMagento
System Configuration on Magento2:— Daily Magento Tips (@DailyMagento) March 7, 2021
🛠️env.php: used for environment config. Can't be changed via admin.
🛠️config.php: used for common configs that likely won't be changed. Can't be changed via admin
🛠️config.xml: for module default configs.xml. Can be changed via admin.