WP Rocket Setup Guide: Quick Wins for Core Web Vitals

November 4, 2025
WP Rocket Setup Guide: Quick Wins for Core Web Vitals

WP Rocket is one of the most effective caching and performance optimization plugins for WordPress. Unlike most free cache plugins, it automatically handles many optimizations that directly improve Core Web Vitals — including LCP, CLS, and INP — with minimal configuration. This step-by-step guide covers the best settings for fast, stable performance and top PageSpeed Insights scores.


What Is WP Rocket?

WP Rocket is a premium caching plugin that improves site speed by optimizing how your pages are served and assets are loaded. It handles:

  • ✅ Page caching and preloading
  • ✅ File optimization (CSS, JS, HTML)
  • ✅ Lazy loading for images and iframes
  • ✅ Database cleanup
  • ✅ CDN and Cloudflare integration

With just a few clicks, WP Rocket can significantly improve your Google Lighthouse and Core Web Vitals scores.


Step 1: Install and Activate WP Rocket

  1. Purchase and download WP Rocket from wp-rocket.me.
  2. In your WordPress dashboard, go to Plugins → Add New → Upload Plugin.
  3. Upload the wprocket.zip file, then click Install NowActivate.

Once activated, WP Rocket automatically applies default optimizations — page caching, browser caching, and GZIP compression — without further configuration.


Step 2: Enable Page Caching (Default)

By default, WP Rocket creates static HTML versions of your pages and serves them to visitors, dramatically reducing load time.

Verify Cache Activation

  • Go to Settings → WP Rocket → Dashboard.
  • You should see “Cache is active” confirmation.
  • Click Clear Cache anytime you make design or content updates.

Best Practice:

Visit your site in an incognito window. Right-click → “View Source” and scroll to the bottom. You should see this comment:

<!-- This website is like a rocket, thanks to WP Rocket! -->

That means page caching is working correctly.


Step 3: Optimize CSS and JavaScript

Go to Settings → WP Rocket → File Optimization.

CSS Optimization

  • Minify CSS files: ✅ ON — reduces file size.
  • Combine CSS files: ⚠️ Optional — only enable if no visual issues occur.
  • Optimize CSS delivery: ✅ ON — eliminates render-blocking CSS and improves LCP.

JavaScript Optimization

  • Minify JavaScript files: ✅ ON.
  • Combine JavaScript files: ⚠️ Optional (test carefully with third-party scripts).
  • Load JavaScript deferred: ✅ ON — prevents blocking during page load.
  • Delay JavaScript execution: ✅ ON — delays non-critical scripts (Google Analytics, ads, etc.) until user interaction.

These settings have the biggest impact on INP (Interaction to Next Paint) and LCP (Largest Contentful Paint) scores.


Step 4: Enable Media Optimization

Go to Settings → WP Rocket → Media.

Recommended Settings:

  • LazyLoad for images: ✅ ON.
  • LazyLoad for iframes and videos: ✅ ON.
  • Replace YouTube iframe with preview image: ✅ ON (reduces CLS and improves INP).
  • Add missing image dimensions: ✅ ON (fixes layout shifts, improves CLS).

Lazy loading defers non-critical images and videos until they enter the viewport, drastically improving initial render times.


Step 5: Preload Cache

Go to Settings → WP Rocket → Preload.

  • Activate Preloading: ✅ ON.
  • Preload Links: ✅ ON (loads pages instantly when users hover over links).
  • Preload Fonts: ✅ ON (add your custom fonts if you use local fonts).

Preloading ensures your pages are cached before visitors arrive, reducing TTFB (Time to First Byte).


Step 6: Enable Browser Caching & GZIP Compression

These are handled automatically by WP Rocket upon activation. You can verify by checking your HTTP headers:

$ curl -I https://yourwebsite.com/
Cache-Control: max-age=31536000
Content-Encoding: gzip

This confirms both browser caching and GZIP compression are active, improving repeat visits and transfer efficiency.


Step 7: Optimize Database

Go to Settings → WP Rocket → Database.

  • Revisions: ✅ Clean
  • Drafts & Trash: ✅ Clean
  • Spam & Trash Comments: ✅ Clean
  • Transients: ✅ Clean
  • Optimize Tables: ✅ Run weekly

Click Save and Optimize to clean up unnecessary data and keep your database fast and lean.


Step 8: Integrate a CDN (Optional)

If you use a CDN (Content Delivery Network), go to Settings → WP Rocket → CDN.

  • Enter your CDN CNAME (e.g. cdn.yourdomain.com).
  • Select which files to serve via CDN (images, CSS, JS).

For Cloudflare users, enable the built-in Cloudflare Add-on under Settings → Add-ons → Cloudflare and connect your account with the API key. This helps combine WP Rocket’s optimization with Cloudflare’s global caching.


Step 9: Delay Third-Party Scripts

One of WP Rocket’s most powerful features is its ability to delay JavaScript execution — including third-party scripts like analytics or ads — until user interaction.

  1. Go to Settings → File Optimization → Delay JavaScript Execution.
  2. Ensure it’s toggled ON.
  3. WP Rocket automatically detects common scripts, including:
    • Google Analytics (gtag, ga.js)
    • Google Tag Manager (gtm.js)
    • Facebook Pixel
    • Hotjar, TikTok Pixel, etc.

This improves INP and FID scores by deferring analytics until after user engagement.


Step 10: Test Your Core Web Vitals

After applying these settings, test your site using:

Target Benchmarks:

  • LCP (Largest Contentful Paint): under 2.5s
  • CLS (Cumulative Layout Shift): below 0.1
  • INP (Interaction to Next Paint): under 200ms

Step 11: Troubleshooting Tips

  • 🧩 If your layout breaks, disable “Combine CSS/JS” first.
  • 🎞 If videos or embeds don’t load, temporarily disable LazyLoad for iframes.
  • 🔄 After any major update, click Clear Cache and Preload Cache.
  • 📱 Use “Mobile Cache” for responsive themes under Cache → Mobile Cache.

Quick Configuration Summary

  • 🧠 Page Cache: ON
  • 🧩 Optimize CSS/JS: Minify + Defer
  • 🖼 LazyLoad Images & Videos: ON
  • Preload Cache: ON
  • 🗑 Database Cleanup: Weekly
  • 🌐 CDN: Optional (Cloudflare, Bunny, etc.)

Conclusion

WP Rocket provides instant performance gains out of the box — but with the optimizations above, you’ll see dramatic improvements in Core Web Vitals. It minimizes render-blocking scripts, defers third-party code, and optimizes media for faster loading and smoother interaction. Combine WP Rocket with a CDN and good image optimization to achieve near-perfect PageSpeed scores and an exceptional user experience.

Summary: Install → Enable caching → Minify & defer CSS/JS → Lazy load → Preload → Clean database → Test → Enjoy green Core Web Vitals.

Avatar

Written by

satoshi

I’ve been building and customizing WordPress themes for over 10 years. In my free time, you’ll probably find me enjoying a good football match.