Resolving an error 400 “bad request” in minified files

⛔️ Deprecated: This document covers a potential issue with WP Rocket 2.10.x or lower.
It does not apply anymore for WP Rocket 2.11 or greater.

In this article

Identify 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</p>

This can happen related to certain server configurations.

Fix error 400 via 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:

Go to Static Files and disable the option Combine all CSS/JS files into as few files as possible. It is not compatible with all environments.

Uncehcked option “Combine all CSS/JS files into as few files as possible”
Sometimes the issue is that a particular file needs to be excluded from the optimization process. This is probably the case if you do not have the option Combine all files into as few as possible enabled, and you notice that other minified files are created correctly. Please see this guide for further tips:
Resolving Issues with File Optimization