WP Rocket is the preferred caching and performance plugin. Correct settings matter — wrong configuration breaks sites.
Cache Tab
| Setting | Value | Notes | |---------|-------|-------| | Enable caching for mobile | ON | — | | Separate cache for mobile | OFF | Unless using different mobile theme | | User cache | OFF | Enable only for membership sites | | Cache lifespan | 10 hours | Increase for static sites |
File Optimization Tab
| Setting | Value | Warning | |---------|-------|---------| | Minify CSS | ON | Safe | | Combine CSS | OFF | Breaks Elementor | | Minify JS | ON | Safe | | Combine JS | OFF | Breaks plugins | | Load JS deferred | ON | Test thoroughly | | Delay JS execution | ON | Test — can break sliders | | Remove unused CSS | ON | Safe for most Elementor sites |
Media Tab
| Setting | Value | |---------|-------| | Lazy load images | ON | | LazyLoad iframes/videos | ON | | Replace YouTube thumbnails | ON | | WebP compatibility | ON |
Preload Tab
| Setting | Value | |---------|-------| | Activate preloading | ON | | Preload links | ON | | Prefetch DNS requests | Add: Google Fonts, GTM, analytics domains |
Advanced Rules
Never cache these URLs:
/wp-admin/
/checkout/
/cart/
/my-account/
/wp-login.php
WP Rocket + Cloudflare Add-on
- WP Rocket > Add-ons > Cloudflare
- Enter: Email address, Global API Key, Zone ID
- Enable: "Optimal Settings" and "Auto-purge Cloudflare cache on update"
WP-CLI Cache Operations
# Clear all WP Rocket cache
wp cache flush
# WP Rocket specific clear (if plugin CLI available)
wp rocket clean --confirm
# Preload cache after clearing
wp rocket preload --confirm
Lighthouse Score Targets
After WP Rocket + Cloudflare + ShortPixel:
- Performance: 90+
- LCP: < 2.5s mobile
- CLS: < 0.1
- TTFB: < 200ms on WPX, < 300ms on shared hosting