cancel
Showing results for 
Search instead for 
Did you mean: 

Unlock configuration

SOLVED

Unlock configuration

Hello,

 

I am new to Magento and doing a PoC on a single server (no dev, staging or prod server).

 

By mistake I did

 

bin/magento app:config:dump

So, parameters got locked and cannot edit using the Admin page anymore. I can change parameters only via the CLI.

 

How to unlock or rollback to the previous situation, i.e. be able to use the Admin page to edit the configuration ?

 

Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Unlock configuration

Hi @paulo_lima

 

okay - i have checked the things you are saying and below is the solution for that.

 

open config.php file from app/etc/config.php location.

 

Now remove everything from this file except - modules array like below code :

 

 

return array (
'modules' => 
array (
'Magento_Store' => 1,
'Magento_AdminNotification' => 1,
...
...
...
),
);

 

then save this file  !!

 

now after saving this file you need to run below command :

 

php bin/magento setup:upgrade

php bin/magento setup:di:compile

php bin/magento cache:clean

php bin/magento cache:flush

 

Then logged in to your backend admin panel - and check now configuration are unlocked and able to editable.

 

you don't required to do import for the same , if you just wanted to unlocked this settings.

 

if issue solved,Click Kudos & Accept as Solution

View solution in original post

11 REPLIES 11

Re: Unlock configuration

Hi @paulo_lima

 

Actually the command you have run is used for export the configuration settings . so AKAIK it will not locked any features.

 

can you please elaborate more from where and what you are going to edit ?

 

Here is the ref link for this command - https://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-config-mgmt-export.h...

if issue solved,Click Kudos & Accept as Solution

Re: Unlock configuration

Hi,

 

Thanks for the reply.

 

I am facing same issue as here: https://magento.stackexchange.com/questions/196912/appconfigdump-locks-everything-in-configuration

 

After the dump command, I cannot edit anymore parameters in the admin panel and I don´t know exactly how to re-activate again.

 

Magento 2.2.4

 

Thanks.

Re: Unlock configuration

Hi @paulo_lima

 

Yes i think you are right !! based on the link you have share i think its locking the admin configuration !!

 

but have you tried their solution ? they mention on the same link ?

 

Like below  solution : 

 

You have two options to edit configuration values after you dump the config:

remove the needed configuration line from the config file (and then run config:import). This will make it editable in Admin Panel again.


change the needed config value with the help of config:set --lock CLI command

if issue solved,Click Kudos & Accept as Solution

Re: Unlock configuration

Hi,

 

Running config:set works but is not an option. I want to be able to edit configurations using the Admin panel.

 

The other option did not work for me.

config.php and env.php are complicated to read with many nested parameters. I am afraid to mess it. Anyway, I tried but I got many errors when running config:import related to a theme that I imported.

 

Thanks.

Re: Unlock configuration

Hi @paulo_lima

 

okay - i have checked the things you are saying and below is the solution for that.

 

open config.php file from app/etc/config.php location.

 

Now remove everything from this file except - modules array like below code :

 

 

return array (
'modules' => 
array (
'Magento_Store' => 1,
'Magento_AdminNotification' => 1,
...
...
...
),
);

 

then save this file  !!

 

now after saving this file you need to run below command :

 

php bin/magento setup:upgrade

php bin/magento setup:di:compile

php bin/magento cache:clean

php bin/magento cache:flush

 

Then logged in to your backend admin panel - and check now configuration are unlocked and able to editable.

 

you don't required to do import for the same , if you just wanted to unlocked this settings.

 

if issue solved,Click Kudos & Accept as Solution

Re: Unlock configuration

I prefered to re-install. Anyway, I accepted your solution as it would work as well. Thanks for the help.

Re: Unlock configuration

Hi @paulo_lima

 

Glad to know that you have resolved your issue - happy to help and keep helping Smiley Happy

if issue solved,Click Kudos & Accept as Solution

Re: Unlock configuration

Can we get a solution that does not require clearing our config?

Re: Unlock configuration

Hi @liam_mitchell

 

Well , as known as i know - right now there is no other alternate option for that - because i have try to find but i am unable to get exact alternate option for that !

 

So take a backup of your existing config.php file and then clear its content , if any issue you will face then restore your backup file.

 

Hope it helps 

if issue solved,Click Kudos & Accept as Solution