Magento 2: How to disable Minify CSS JS setting?
-
13-04-2021 - |
سؤال
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?
المحلول
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/
نصائح أخرى
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
لا تنتمي إلى magento.stackexchange