17

I went to the admin panel.

Then I went to

Stores > Configuration > Advanced > Developer > CSS Settings

Stores > Configuration > Advanced > Developer > JavaScript Settings

and enabled minify CSS and Javascript.

Now, CSS and JS of my website are not working. My admin panel and the website is broken. How do I disable this setting?

1
  • You can only disable it in developer mode
    – Black
    Mar 15 at 11:55

3 Answers 3

32

Access your MySQL and use these commands:

UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/merge_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/enable_js_bundling';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/minify_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/css/merge_css_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/css/minify_files';

Or you can use the Magerun in your terminal:

magerun config:store:set dev/js/merge_files 0
magerun config:store:set dev/js/enable_js_bundling 0
magerun config:store:set dev/js/minify_files 0
magerun config:store:set dev/css/merge_css_files 0
magerun config:store:set dev/css/minify_files 0

Then run these commands to deploy again:

alias mage="php -d memory_limit=-1 -f bin/magento"

mage cache:flush &
mage indexer:reindex &
mage setup:upgrade &&
mage deploy:mode:set developer &&
mage setup:static-content:deploy -f &&
chmod -R 775 pub/static/ pub/media/ var/
5
  • Thanks for you answer. I ran mysql script and it ran successfully. It changed some values in table from 1 to 0. Do i need to run setup:upgrade now?
    – kashish
    Aug 4, 2017 at 14:42
  • I recommend to run all these last commands Aug 4, 2017 at 14:48
  • oh, okay. Trying that.
    – kashish
    Aug 4, 2017 at 14:49
  • If I'm in developer mode, I need not run setup:static-content:deploy.Right?
    – kashish
    Aug 5, 2017 at 4:27
  • you don't need, but I recommend to run Aug 6, 2017 at 18:41
14
php bin/magento config:set dev/js/merge_files 0
php bin/magento config:set dev/js/enable_js_bundling 0
php bin/magento config:set dev/js/minify_files 0
php bin/magento config:set dev/css/merge_css_files 0
php bin/magento config:set dev/css/minify_files 0
0

Use Below Command for - Disable(0) / Enable(1) from SSH/Putty/CMD.

Merge Minify JS

php bin/magento config:set dev/js/merge_files 0

php bin/magento config:set dev/js/minify_files 0


JS Bundling

php bin/magento config:set dev/js/enable_js_bundling 0


Merge Minify CSS

php bin/magento config:set dev/css/merge_css_files 0

php bin/magento config:set dev/css/minify_files 0


CSS Critical Path

php bin/magento config:set dev/css/use_css_critical_path 0


Minify HTML

php bin/magento config:set dev/template/minify_html 0


Note: In last don't forget to run below command

php bin/magento cache:clean

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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