Question

I attempted to speed up my website by bundling, merging, and minifying the JavaScript and CSS through the Admin.

Stores> Settings> Configuration> Advanced> and then Developer, and changed the five options from "No" to "Yes".

Now, my website loads really fast, but some of the graphic elements like the shopping cart icon are just empty squares, and other elements are stretched and out of their places. Also, I can't place anything in the cart.

The "Stores" tab no longer works in the Admin sidebar, so I can't get back in to reverse the changes. Also, the graphic elements in the Admin sidebar are empty boxes also.

I have only been able to find a possible solution for Magento version 1.x, and I haven't found the database entries that were mentioned in my version, which is 2.1.8 CE.

I have backups of my entire website, including the database and the Magento installation.

I am database savy, so if anyone knows which database settings I need to change to set the options back to "No", and which bundled, merged, and minified JavaScript and CSS files (I assume they are in pub/static) I need to replace with the ones from my backups, or other solutions that work, please let me know.

If it is of any help, the store was installed through my cPanel using Softaculous, and there are no third-party extensions in use.

I have no intention of using bundling, merging, and minifying again.

Thank you very much for your help.

These are some of the things that I have tried:

Switching back and forward from developer mode to production mode;

Emptied some 'var' folders;

php bin/magento setup:upgrade;

php -f /home/eq/public_html/bin/magento indexer:reindex;

php bin/magento deploy:mode:set production -s;

php -f /home/eq/public_html/bin/magento setup:di:compile;

php bin\magento setup:static-content:deploy;

php -f /home/eq/public_html/bin/magento cache:flush;

php -f /home/eq/public_html/bin/magento cache:clean;

php bin\magento setup:static-content:deploy;
Was it helpful?

Solution

The values are stored in core_config_data. The paths for these are:

  • dev/css/merge_css_files
  • dev/css/minify_files
  • dev/js/merge_files
  • dev/js/minify_files
  • dev/js/enable_js_bundling

Set these all back to '0'. Or, you can run the following:

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';
UPDATE core_config_data SET value = 0 WHERE path = 'dev/js/merge_files';
UPDATE core_config_data SET value = 0 WHERE path = 'dev/js/minify_files';
UPDATE core_config_data SET value = 0 WHERE path = 'dev/js/enable_js_bundling';

Then you can attempt to rebuild everything (flush cache first). Also, I'd recommend never minifying JS in Magento. Ever.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top