Hello @leandrosilvaarq
Thank you for reaching out and I am happy to help!
The problem is that the unused JavaScript and CSS are unused before the minification. What you are attempting to do is to exclude from the Minify the files that are created by the Minify option.
What you should do is to disable Minify, check the individual files that are marked as unused, optimize those files with the other plugin (Please note that this removes the file entirely and may break your pages), and before you re-enable Minify, make sure to add those files to “Never minify the following JS files” and “Never minify the following CSS files,” To ensure that the files are not minified.
Make sure to save all settings and purge the cache.
I hope this helps and let me know if you have any other questions
Thanks!
Hello @vmarko,
Thank you for your response and solution.
Disabling Minify shows the following list of files identified as unused:
/wp-content/themes/semplice6/assets/js/shared.scripts.min.js?ver=6.2.4
/wp-content/themes/semplice6/assets/js/frontend.scripts.min.js?ver=6.2.4
/wp-content/themes/semplice6/assets/js/frontend.min.js?ver=6.2.4
/wp-includes/js/mediaelement/mediaelement-and-player.min.js?ver=4.2.17
/wp-includes/js/mediaelement/mediaelement-migrate.min.js?ver=6.4.3
/wp-includes/js/jquery/jquery.min.js?ver=3.7.1
/wp-content/themes/semplice6/assets/css/frontend.min.css?ver=6.2.4
/wp-includes/css/dist/block-library/style.min.css?ver=6.4.3
/wp-content/plugins/w3-total-cache/pub/js/lazyload.min.js
“Semplice” is the theme we use for website development, so I’m unsure if it’s possible to delay/delete any of the files mentioned above using the other plugin.
With Minify turned off, if I add them in the other plugin, activate Minify, and the website stops working, can I revert those changes? Or will I need to remove W3 Total Cache, delete the folders in cPanel, and reinstall it again?
Thanks in advance.
Best regards,
Leandro
Hello @leandrosilvaarq
Sorry for the delay.
Have you added those files to exclusion in minify settings? And if the minify is disabled, with those files added to the other plugin, does the issue persist?
Thanks!
Hello @vmarko,
Thanks for your reply.
I disabled Minify and then added the following keywords (based on the list of files identified as unused) to Flying Scripts:
js/shared.scripts.min.js
js/frontend.scripts.min.js
js/frontend.min.js
js/mediaelement/mediaelement-and-player.min.js
js/mediaelement/mediaelement-migrate.min.js
js/jquery/jquery.min.js
css/frontend.min.css
css/dist/block-library/style.min.css
js/lazyload.min.js
I attempted to add keywords one by one (to observe the outcome), but each time I added one, the website ceased to function properly (everything appeared blank) due to the inclusion of those keywords in Flying Scripts.
Thanks!
Hello @leandrosilvaarq
Sorry for the late reply.
This seems to be related to the other plugin you are using. You should approach this with care and only remove the files from the pages those files are not needed.
We have added similar feature in the latest 2.7.0 release.
Thanks!
Hello @vmarko,
Those keywords are related to the “Semplice” theme used on the website, so I can’t correctly identify which specific pages those keywords are being used on.
If I’m not mistaken, the other plugin only allows adding keywords in a general manner and does not apply them to specific pages (it only allows excluding keywords on specific pages).
Thank you!