Resolving issues with Minify CSS files

To resolve display issues that may occur when Minify CSS files is active, please follow these steps:

  1. Go to the Get Page Resources online tool.
  2. Enter the URL of the page with the CSS issue.
  3. Click on the Get Non-cached Page Resources button.
  4. In the left sidebar, click on CSS > External CSS Files to get the list of the CSS stylesheets on your site:

    Get Page Resources

  5. Copy the list of CSS files, then go to WP Rocket Settings > File Optimization and paste the list into the Minify CSS files > Excluded CSS Files field:

    Excluded CSS files

  6. Save the settings and check your site, in a logged-out or incognito window. It should now be displaying correctly.
  7. Now remove each file from the list, one-at-a-time. After each removal, save the settings and check your site. Repeat this until the website is broken again.
  8. When the website breaks, replace the last removed file back into the list and move onto the next file.

Note: this method can also be used for issues with Minify/Combine JavaScript files (using the JavaScript > External scripts results in the Get Page Resources tool), but the method described here is faster.

Excluding files from external domains

Files from external domains can be excluded either by the domain name or the full file URL. e.g. to exclude: https://bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css You may use either: bootstrapcdn.com or https://bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css

Heads up!

Certain patterns of exclusions cannot be handled and are automatically removed.

If you add them, you should see a notice with the "WP Rocket: The following patterns are invalid and have been removed" message.

Please see more in our Invalid patterns of exclusions article.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.