Resolving 400 Bad Request Issue on Minified Files

In this article

Identifying an Error 400

In rare cases, when you activate minification there is an issue where your site layout breaks. If you then click on the link to any minified file in the source code of a page, you see the following error message:

<h1>400 Bad Request</h1><p>Please see http://code.google.com/p/minify/wiki/Debugging.</p>

This can happen related to certain server configurations.

Fix Error 400 via a Small Helper Plugin

If you see this issue, you can fix it by download and install this small helper plugin :

📥  Download (.zip): WP Rocket | Fix 400 Errors

Developers: You can find the code for this plugin on GitHub.

Other Possible Solutions

If the above helper plugin does not work, one of the following might:

1.
In the Static Files tab, disable the option:  Combine Files > Combine all CSS/JS files into as few files as possible

This option is not compatible with all servers.

2.
Sometimes the issue is that a particular file needs to be excluded from the optimization process. This is probably the case if you don't have the Combine all files into as few as possible option enabled, and you notice that other minified files are created correctly. 
Please see this guide on  Resolving Issues with File Optimization for further tips.