Can Yildirim's Blog

System Configuration on Magento2 | #MagentoTips1

August 23, 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.

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

magento-config

Follow : @DailyMagento


Can Yildirim

Written by Can Yildirim who lives in London. Full Stack Software Engineer. Follow me on Twitter Linkedin

© 2023,