W3 Total Cache JavaScript minification troubleshooting

Editor’s Rating
Ease of Use Not Rated
Price Not Rated
Power Not Rated

W3 Total Cache is a really popular caching plugin for WordPress. It’s easy to set up, and using default settings you can significantly boost your site’s performance.

Unfortunately, there is one common issue with the default JavaScript compression settings when you have several other plugins installed – it breaks js!

Default W3TC minify settings look as follows:

W3 Total Cache minify settings


If your JS-dependent features stopped working after enabling JS minification, you have to:

  1. switch minify mode to “Manual” on W3TC Global Settings Page;
  2. go to minify section in W3TC configuration page;
  3. in JS section, click enable, then…
  4. pick your theme from the dropdown menu to the right of JS file management;
  5. now comes the tricky part – you’ll have to manually enter all js files, one by one, after pressing add a script button and Save all settings;
    • remember to exclude from this list any js files used by site features which are broken
  6. after clearing W3TC page and minify caches, you can test if excluding a file from compression helped (it should!).

List of js files

Ok, but how do you get all your js files? It depends on a browser you’re using.


  1. install and enable Firebug Extension;
  2. open it by clicking a “bug” icon in the browser’s status bar or simply by clicking Ctrl+Shift+C ( ?+Shift+C on Mac);
  3. switch to Net tab;
  4. click JS filter at the top;
  5. click Domain table header to order by domain name to have JS files grouped by domain.

Now you can simply right click each js and copy it to W3TC JS minify settings.

Google Chrome:

  1. open developer tools by clicking Ctrl+Shift+C ( ?+Shift+C on Mac);
  2. switch to Network tab;
  3. filter Scripts at the bottom.

Now you have to copy-paste each script address by right-clicking its name, choosing Copy Link Address option and pasting it into W3TC JS minify settings.
Safari and Opera are pretty much the same.

Final thoughts

While solving this kind of problems always require testing, I think our life would be easier if  the author of W3 Total Cache changed this part of configuration a little bit. My suggestion is to change it to “exclude the following scripts from compression” because that’s what we actually want to do. You also have to remember to update this list every time you add new plugins.

About Lury

Lukas is an experienced IT guy with huge amount of knowledge regarding website performance and optimization. With just few click he can pinpoint your major problems and provide you with the solution.

Ready to socialize?

, , , , , , , , ,

No comments yet.

Leave a Reply

CommentLuv badge

Read previous post:
Review of Instant Article Wizard 3.0

If you're an online publisher, you probably need a lot of fresh content, especially if you run a network of niche sites. Instant Article Wizard 3.0 strives to be a solution to this challenge. It's best described as an automated subject research tool which can automatically collect large database of snippets and generate articles automatically. Does it work?