Background
WP Rocket is one of the most popular caching plugins for WordPress—but users frequently report, “I installed WP Rocket, yet my pages are still slow.” In most cases, the issue isn’t with WP Rocket itself; rather, it’s caused by misconfigurations or interference from third-party plugins that prevent cache hits.
Below are the five most common causes encountered in real-world operations.
1. WooCommerce geolocation_ajax Forces 307 Redirects
Symptom: High TTFB on product pages, while the homepage loads normally.
WooCommerce’s geolocation_ajax mode triggers a 307 redirect on every request and appends a ?v= parameter—causing users to never hit the cache directly.
Diagnosis:
curl -sS -D - -o /dev/null "https://your-domain.com/product/slug" 2>&1 | grep -iE "HTTP/|location"
If you see a 307 status code and the ?v= parameter, this is your culprit.
Fix: For digital-goods stores, switch to base_address:
wp option update woocommerce_default_customer_address base_address
2. Login-State Cookies Bypass Caching
Symptom: Admins or logged-in users consistently fail to receive cached front-end pages.
By default, WP Rocket does not cache pages for logged-in users. If your site has many registered users (e.g., membership sites), this means most traffic bypasses caching entirely.
Diagnosis:
# Access with cookies
curl -sS -D - -o /dev/null -b "wordpress_logged_in_xxx=value" "https://your-domain.com/" 2>&1 | grep -i "x-wp-rocket"
# Access without cookies
curl -sS -D - -o /dev/null "https://your-domain.com/" 2>&1 | grep -i "x-wp-rocket"
Fix: If front-end content is identical for all users, enable “Cache for logged-in users” in WP Rocket’s settings.
3. Query Strings Cause Cache Fragmentation
Symptom: Multiple distinct cache files are generated for the same page due to varying URL parameters.
Tracking parameters like UTM tags (?utm_source=...), Facebook’s fbclid, or Google’s gclid cause WP Rocket to generate a separate cache file for each unique URL.
Diagnosis:
# Count total HTML cache files
find /wp-content/cache/wp-rocket/ -name "*.html" | wc -l
# Check for excessive parameterized cache files
ls /wp-content/cache/wp-rocket/your-domain.com/
Fix: In WP Rocket’s Advanced Settings, add common tracking parameters to the “Query strings to ignore when caching” list:
fbclid
gclid
utm_source
utm_medium
utm_campaign
utm_content
utm_term
4. Other Plugins Define the DONOTCACHEPAGE Constant
Symptom: Certain pages are never cached—without an obvious reason.
Some plugins set the DONOTCACHEPAGE constant under specific conditions, instructing caching plugins to skip those pages. Common offenders include security plugins, A/B testing tools, and certain form plugins.
Diagnosis:
grep -rn "DONOTCACHEPAGE" /path/to/wp-content/plugins/
Fix: Identify which plugin sets the constant and assess whether disabling caching is truly necessary. Often, it’s an overly conservative default behavior.
5. Missing Server-Side Rewrite Rules
Symptom: WP Rocket generates static cache files, but Nginx/Apache still routes requests through PHP instead of serving cached HTML directly.
WP Rocket saves static HTML files—and requires web server-level rewrite rules to serve them directly, bypassing PHP entirely.
Diagnosis:
curl -sS -D - -o /dev/null "https://your-domain.com/" 2>&1 | grep -iE "x-wp-rocket|x-powered-by|server"
If the response includes X-Powered-By: PHP but lacks WP Rocket’s cache headers, static files aren’t being served.
Fix: Ensure your Nginx configuration includes WP Rocket’s official rewrite rules (available in WP Rocket’s documentation), or verify that Apache’s .htaccess contains the corresponding directives.
General Troubleshooting Workflow
# 1. Confirm whether cache is being hit
curl -sS -D - -o /dev/null "https://your-domain.com/" 2>&1 | grep -iE "x-wp-rocket|cache"
# 2. Inspect redirect chain
curl -sS -o /dev/null -w "HTTP: %{http_code} | TTFB: %{time_starttransfer}s\n" -L "https://your-domain.com/"
# 3. Verify cache file existence
ls -la /wp-content/cache/wp-rocket/your-domain.com/
# 4. Clear cache and retest
wp rocket clean --confirm
Run this workflow whenever you encounter caching issues—it will identify the root cause in most cases.