Session Overview

Sam asked how to fix a SEMrush warning showing 507 issues with unminified JavaScript and CSS files. The screenshot showed repeated wp-content/cache/fonts/1/google-fonts/css/...css resource URLs on aguiarinjurylawyers.com. The working goal became: fix the warning at source, test live behavior, and keep rollback clear.

What Was Accomplished

Live checks confirmed this was not 507 unique page-level defects. It was WP Rocket generated hosted Google Fonts CSS reused across many URLs. The first sample resource was:

https://aguiarinjurylawyers.com/wp-content/cache/fonts/1/google-fonts/css/1/6/e/4aa802e0e782a2fad1d46d6e1b155.css

Before state: the CSS returned 200, was 4,041 bytes, and began with /* devanagari */, confirming SEMrush's unminified-file signal. WP Rocket was active at version 3.21.1. Live WP Rocket options showed host_fonts_locally=1, minify_google_fonts=1, minify_css=1, and minify_js=1.

A reversible MU plugin was created locally and uploaded to production:

/Users/samaguiar/Documents/Codex/wp-fixes/2026-05-20-wp-rocket-font-css-minifier/sal-wp-rocket-font-css-minifier.php

Production path:

/var/www/html/public_html/wp-content/mu-plugins/sal-wp-rocket-font-css-minifier.php

The plugin hooks rocket_css_content and minifies only CSS that looks like font-face CSS with @font-face, unicode-range, and font-display. It PHP-linted clean locally and on the server.

A rollback folder was created on the server:

/var/www/html/public_html/wp-content/mu-plugins/_codex-rollback-20260520-font-css-minifier/

Its rollback note says to remove wp-content/mu-plugins/sal-wp-rocket-font-css-minifier.php, then purge WP Rocket and Cloudways caches.

Cloudways app cache purge was executed through the Cloudways API using endpoint /api/v1/app/cache/purge for server 1615235, app 6360875. Operation ID was flex-87697900, and polling returned Operation completed.

What Was Tried and Did Not Work

The MU plugin alone did not change the public direct CSS response. Fresh cache-busted requests after upload and Cloudways purge still returned a 4,041-byte formatted CSS file with 9 block comments.

Reason found: the direct hosted-font CSS path is served by Cloudways/nginx even though the matching physical file is missing from /var/www/html/public_html/wp-content/cache/fonts/.... Fresh public requests and the Cloudways app domain both returned the same 200 response, while SSH checks showed the exact file path was missing. This suggests an upstream Cloudways/nginx font-cache behavior or generated object outside the visible app tree.

A sitemap crawl was started to discover distinct hosted-font CSS URLs. Despite noisy DNS/timeouts from high parallelism, it found 540 sitemap URLs and 5 distinct WP Rocket hosted-font CSS URLs: