2

I'm trying to do

php -f bin/magento config:set dev/js/enable_js_bundling 1

But I get:

The value you set has already been locked. To change the value, use the --lock-env option.

What does this mean and how can I achieve what I want?

2 Answers 2

2

It seems you have locked the admin / configuration changes using the app:config:set command. Now the only option you have is to make necessary changes in your config.php.

Entries would be like:

 'js' => [
                'merge_files' => '0',
                'minify_files' => '0',
                'minify_exclude' => '
                /tiny_mce/',
                'session_storage_logging' => '0',
                'translate_strategy' => 'dictionary',
                'enable_js_bundling' => '0',
            ],
            'css' => [
                'minify_files' => '0',
                'minify_exclude' => '
                /tiny_mce/
            ',
                'merge_css_files' => '0',
            ],

Set values to 1 where you want to enable minification / merging and save this file. After saving run the php bin/magento app:config:dump command.

1
1

Can also do

php -f bin/magento --lock-env config:set dev/js/enable_js_bundling 1

Which will override the locked setting with new one and lock it again

1
  • Is there any way to remove entry from env.php file? For eg. i want to remove merge and minify config from env.php. It was added using --lock-env command. but now i want to remove as it override the configuration May 5, 2023 at 8:50

Your Answer

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

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