I'd like to import system config through the app:config:import command.

I have update app/etc/config.php file with described customer/captch/enable config path:

<?php return array (
  'system' =>
  array (
    'default' =>
    array (
      'customer' =>
      array (
        'captcha' =>
        array (
          'enable' => '0',

  'modules' =>
  array (
    'Magento_Store' => 1,
    'Magento_Directory' => 1,
    'Magento_Eav' => 1,
    'Magento_Backend' => 1,

I'm expecting after magento app:config:import the path customer/captch/enable with value 0 should be added to core_config_data table.

But it's not adding/updating expected record.
What's the point of magento app:config:import in this case?

Is there a way to import this config except using magento config:set?

It's working in the same way for env.php as well, unfortunately.

Magento version: 2.2.5

  • Hi, sorry to open this here, but I want to know if you ever found a way to app:config:import system array settings? I have probably about 1500 system config settings - the Magento theme I use also import into /system_config/ section. All of them are locked (because of config.php), when removing them - defaults are applied. Oct 2, 2020 at 8:28
  • Hi @CvRChameleon, if I understood you correctly, are you talking about app:config:dump? I was just removing newly added data manually. gist.github.com/andkirby/6675e676462899d46f3a1ec478af6aff Sorry, not sure if this that you are talking about =)
    – Kirby
    Oct 2, 2020 at 14:52
  • Hi @Kirby, Unfortunately not - app:config:dump exports from database into config.php whereas app:config:import is supposed to import entries into database, but it skips system_config core_config_data entries :( I have around 1500 entries I am still trying to figure out (even created new questions) how to import them into db. Oct 2, 2020 at 14:55
  • Basically, I have a new database, want to import them into db so that I can remove them from config.php so that they are editable in backend of Magento admin. Very inconvenient system they created with configs. Oct 2, 2020 at 14:55

1 Answer 1


Magento directly uses values in the system array in the config.php or env.php files instead of importing them into the database because they require some pre- and post-processing actions.

See official documentation for more details:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.