Best WP Rocket Settings to Pass Core Web Vitals (2024)

WP Rocket is one of the most famous & powerful WordPress cache plugins. It launched in 2013; it quickly became the World’s best WordPress cache plugin to Speed up your website loading time.

This article shares the Best WP Rocket Settings to Improve Core Web Vitals Scores & overall user experience within 5 minutes. This step-by-step guide is beginner-friendly, & you don’t need any coding experience required to improve your WordPress website performance.

About WP Rocket Cache Plugin

No one likes slow-loading websites. Website Speed optimizations are significant for your website, and it’s so important that Google’s recent Core Web Vitals update has made it an essential ranking factor.

WP Rocket is the most powerful WordPress performance plugin in the World. After installing WP Rocket, It immediately applies to the WordPress website & reduces your load time, and boosts your Google’s Core Web Vitals scores up to 80%.

WP Rocket

Today WP Rocket powers over 3 million WordPress websites to boost loading time. WP Rocket improves your site’s website loading time & user experience by improving your server performance, caching every aspect of your site, database cleanup, reducing the download times, providing CDN integration, etc.

After using WP Rocket, here’s my website core web vitals result:

Core Web Vitals result

It’s suitable for all types of users, from beginners to experts, entrepreneurs to business owners, and everyone in between. WP Rocket is also completely flexible with all popular WordPress themes, drag & drop WordPress page builders like Elementor, Beaver Builder, etc.

Here are some fantastic WP Rocket features you need to know:

  • Static cache for desktop and mobile,
  • lazy loading for your images,
  • XML sitemaps preloading,
  • Google Fonts optimization,
  • CSS and JS minification,
  • Deferred loading of JS files,
  • WordPress Database optimization,
  • Browser caching,
  • Cross-origin support for web fonts,
  • Combination of inline and 3rd party scripts, and many more

That being said. Now, let’s dive into Best WP Rocket settings to optimize your WordPress website performance.

Best WP Rocket Settings in 2024 (Beginner’s Guide)

One of the reasons I like the WP Rocket plugin so much is because of its simple user interface and quick setup. It’s a WordPress caching plugin with the power to make your site blazing fast, but any beginner could sit down and understand most of the settings involved.

I’m also using WP Rocket settings on all my websites to increase loading time. Here’s my website loading time with the WP Rocket cache plugin, GeneratePress theme, & Kinsta managed WordPress hosting:

WordPress website performance

In this article, I’ll take you through every WP Rocket settings step of the process using actual screenshots. So whether you’re a total WordPress beginner or an advanced WordPress user, you’ll be able to figure everything out quickly.

Step 1: Install WP Rocket on your WordPress website

WP Rocket is a premium WordPress plugin; WP Rocket is unavailable in the plugin directory. To use WP Rocket, you have to buy from their website.

First, Buy the WP Rocket cache plugin (Discount applied automatically). After purchasing WP Rocket, download it from their website (a zip file).

Wp Rocket Download

Next, you need to go to your WordPress website dashboard and visit the Plugins » Add New page. After that, click on the ‘Upload Plugin’ button at the top of the page.

Upload WordPress Plugin

After you have selected the file, you need to click on the ‘Install Now’ button. Once installed, you need to click on the Activate Plugin button to start using the plugin.

Then, head to its configuration options. You will be accessing the WP Rocket configuration dashboard via settings » WP Rocket. Now that you have installed WP Rocket let’s look at other WP Rocket options and how to set them up to improve your website speed further.

Step 2: WP Rocket Dashboard Walkthrough

When you open the WP Rocket setting on the dashboard’s first screen, you can see your WP Rocket license, Expiration date, & RocketCDN subscription details.

Wp Rocket dashboard

You can remove all your website cache files from the WP Rocket dashboard with a single click. And you can regenerate critical CSS and start your website cache preloading with a single click. Don’t worry; we get into every detail.

Step 3: WP Rocket Cache Settings

What is Cache?

Cached data are files, scripts, & images stored on your browser after opening or visiting a website for the first time. This allows a WordPress website to skip running the heavier PHP scripts and improve your website speed.

Wp Rocket Cache Settings

Mobile cache: WP Rocket Mobile cache options create a dedicated cache file for mobile devices (It improves website loading time on mobile devices. Don’t enable mobile caching if you are not using a responsive website design.

Separate cache files for mobile devices: Now, If you use the latest WordPress theme, you don’t need to enable Separate cache files for mobile devices. Enable this option if you use a dedicated WordPress theme only for mobile devices.

User cache: You can enable the User cache option if multiple users log into your website (like a membership site). Otherwise, disable this option. User Cache options allow WP Rocket to create a dedicated set of cache files for each logged-in WordPress user.

Cache Lifespan: WP Rocket Cache Lifespan options allow you to set the cached page’s maximum age. A lower Cache Lifespan means the cache will refresh more frequently.

WP Rocket recommends every user set 10 Hours of Cache Lifespan. But you can set Cache Lifespan to a higher number to save server resources.

Step 4: WP Rocket File Optimization Settings

When you minify your WordPress website’s CSS, HTML, and Javascript files, you can save some valuable time off your site’s page load speed. WP Rocket allows users to minify, combine, and optimize CSS JavaScript files with just a few clicks.

Below are the WP Rocket file optimization settings I use to get the best results in GTmetrix & PageSpeed Insights.

WP Rocket CSS Files Optimization
WP Rocket CSS Files Optimization

Minify CSS files: WP Rocket Minify CSS file options can help reduce their CSS file sizes by removing comments, white spaces, semicolons, and redundant code. If you enable Minify CSS options, WP Rocket automatically replaces the existing CSS files with their optimized version. Optimized CSS files download fast, resulting in a faster execution by the browser.

Combine CSS files: When you enable the Combine CSS option, WP Rocket automatically, all your website CSS files are combined into one CSS file to reduce CSS file size. The Combine CSS options help you reduce the number of HTTP requests on your site.

Optimize CSS delivery: When you Enable the Optimize CSS delivery checkbox, WP Rocket automatically generates critical path CSS for your website in the background and adds it upon the next page load. After that, CSS will be loaded without render-blocking on your site; hence your site page loads faster than usual. It Improves your website user’s experience.

Remove Unused CSS: Unnecessary CSS files can slow down your website performance. After activating the Remove Unused CSS checkbox, WP Rocket automatically collects all CSS stylesheets and scripts and sends files to WP Rocket’s external tool to process. After a few minutes, WP Rocket removes all Unused CSS from the HTML and Used CSS will be added as inline CSS.

Note: Removing unused CSS files is not immediate and may take time. After enabling the “Remove unused CSS” file option, if you notice a high server response time, select the “Load CSS Asynchronously” option.

WP Rocket JavaScript files Optimization
Wp Rocket JavaScript files Optimization

Minify JavaScript Files: When you Enable the JavaScript Minification files checkbox, it allows removing all unnecessary JavaScript source code characters removing website whitespace, comments, and semicolons. WP Rocket JavaScript Minification files compact JS file size to improve website loading time.

Combine JavaScript Files: When you Enable the Combine JavaScript Files checkbox, your website, all JavaScript files, and inline scripts are combined into one single JavaScript file. Combining JavaScript Files helps you reduce your website HTTP requests and improve your website TTFB.

Load JavaScript Deferred: WP Rocket Load JavaScript Deferred option allows your site to load JavaScript after the page has finished parsing. All your website JavaScript files will be loaded with the defer attribute to improve your PageSpeed score by enabling these options.

Delay JanaScript Execution: When you Enable the Delay JavaScript Execution checkbox, It improves website performance by delaying the loading of JavaScript files. Delaying JavaScript Execution will enhance your website’s initial load time & PageSpeed Insights score.

When enabling these options, you’ll see the WP Rocket pre-tested JS files list. When your site uses any lists of JS file scripts, your site automatically improves performance.

Step 5: WP Rocket Media Optimization Settings

Media is one of the main reasons for draining page load time. WP Rocket offers lazyload features for images, iframes, and video loading features. Along with Lazyload, WP Rocket also allows users to replace YouTube iframes with a preview image to improve loading speed.

Wp Rocket Media Optimization

Lazy Load: WP Rocket LazyLoad features delay loading images, iframes, and videos on your website until you scroll down the page and become visible. Google also recommends using LazyLoad features to reduce initial load times and HTTP requests.

Using the LazyLoad sub-option Enable for iframes and videos’ and ‘Replace YouTube iframe with preview image’ helps you relapse all types of videos with preview images since embedded videos are very heavy.

Image Dimension: If you enable the ‘Add missing image dimension’ option, WP Rocket adds missing width + height attributes to HTML images. Browsers can use image dimension information to reserve the space needed for the images on the page. GtMetrix & PageSpeed also recommend you use image dimensions for better performance.

Embeds: Disable WordPress embed options to prevent other sites from embedding your content and remove WordPress JavaScript requests. Always enable these options.

WebP compatibility: WP Rocket does not convert images to WebP format. You still need the Image WebP plugin (ShortPixel Recommend); WP Rocket recommends using the Imagify plugin to handle image conversion. Still, I recommend you use the ShortPixel plugin to convert images into WebP format.

If you are already using WebP images, WP Rocket automatically creates a separate cache file if needed. I’m not using WebP image format on my website; If you want to load images faster and look nicer, you should use WebP format.

Step 6: WP Rocket Preload Settings

Preload allows you to specify resource types that are needed right away or very soon during a page loading time (Typically, this is used for web fonts, CSS, & Javascript). It helps the browser prioritize the resource loading; hence, performance is improved.

Wp Rocket Preload Settings

Preload Cache: WP Rocket Preload cache features allow browsers to start fetching resources very soon. To understand it simply, When you publish blog posts or pages, WP Rocket automatically clears caches for that specific post and any other related content like category, tag, pagination, etc., to ensure your site is fast right away.

WP Rocket automatically Preloading your XML sitemaps generated by Yoast SEO, All-in-one-SEO, and Rank Math SEO to improve performance. If you don’t use SEO plugins and want sitemap preloading, just enter your sitemap URLs in the “Sitemaps for preloading” field.

Preload Links: WP Rocket Preloading links will improve user experience and perceived load times for a user. If any website visitor hovers over a link for 100ms or more, WP Rocket automatically fetches HTML data in the background. So when the user clicks the link, the page will load instantly.

Prefetch DNS Requests: If you add third-party content to your websites like Google fonts, analytics, and YouTube videos. You can add its origin domain to the Prefetch DNS Requests option, and it helps browsers anticipate those third-party content requests loading time.

For example, if you use Google fonts, you can add this: // (Check most common DNS Prefetch URLs). You can also use the GtMetrix tool to find all URLs in the Reduce DNS Lookups section in your YSlow report.

Preload Fonts: WP Rocket Preloading fonts features improve WordPress site loading time and perceived performance. Suppose you don’t know which font you should preload. Then test your website Google PageSpeed Insights; here, you can check out any fonts that could benefit from Preload Fonts this Optimization.

Step 7: WP Rocket Advanced Rules

Sometimes there come cases where you need to ensure some pages are never cached, like cart widgets specifically, or something related to eCommerce checkout pages, or a specific cookie needs to be avoided.

If you are not running an eCommerce site, ignore this WP Rocket’ Advanced Rules’ tab. Leave this blank in all sections. Otherwise, check the WP Rocket official Advanced Rules guide.

Wp Rocket Advanced Rules

Never Cache URLs: If you want to exclude some individual URLs. Just enter the URL of the page like or part after the domain name like /page/. Either way will work.

Never Cache Cookies: WP Rocket Never Cache cookies option will prevent caching in the presence of the specified cookie.

Never Cache User Agents: If you want to prevent cached pages from being served on specific device types and in certain browsers. You can also prevent cached pages from some bots.

Always Purge URLs: When you update a post or a page, WP Rocket automatically clears the cache partially. Use the Always Purge URLs section to specify URLs that you want always to be purged.

Cache Query Strings: A query string is where you have a URL that contains a question mark like ( By default, WP Rocket never caches pages with query strings. If you want Query string pages to be cached, just enter the parameter ( In my example, ‘search’ is the parameter.

Step 8: WP Rocket Database Optimization Settings

WordPress database is where all of the essential website data is stored. Not just the WordPress website usernames and passwords, but it also includes all posts, pages, comments, revisions, and spam comments, as well as all your themes and plugin configuration settings.

Outdated, useless data leads to database bloat. A bloated database can affect TTFB and slow down your website’s loading time. So cleaning up your database not only helps speed up your site but can also clear up a significant amount of space in your database, so it runs more efficiently.

Wp Rocket Database optimization settings

WP Rocket offers a database optimization feature to reduce the size of your database and run regular cleanups.

Wp Rocket Database cleaned

Revisions: Old post revisions quickly add up, especially if you are constantly saving their work over many days (like me). And it’s safe to remove all posts & page revisions.

Auto Draft: WordPress Gutenberg editor automatically saves post versions if you don’t hit Publish.

Trashed Posts: All deleted old post drafts. Remove trashed posts if you don’t need them anymore.

Spam Comments: All comments are marked as spam. You can check spam comments by using the Akismet anti-spam plugin. Their studies show out of every 100 comments, only 15 are legitimate. And it’s safe to remove all spam comments.

Trashed Comments: All deleted comments. And it’s safe to remove all deleted comments.

Expired Transients: Transients temporarily store cached data in your WordPress database. Sometimes, transients set by WordPress plugins can take up a lot of space in your database. And it’s safe to remove expired Transients. WordPress plugins automatically generate new transients when required.

Optimize Tables: WordPress database table is where all the data in a database is stored. Unoptimized database tables can slow down your site. Enable the optimize table option for best performance.

Automatic Cleanup: How often do you want to clean your database with WP Rocket? I set the ‘Daily’ options, but you can change it to daily, weekly, or monthly.

Step 9: WP Rocket CDN Settings

CDN Stands for Content Delivery Network. CDN caches your server’s static resources like stylesheets, javascript, and images from websites based on the user’s geographic location. All static resources are served through CDN servers when a visitor opens your website. CDN reduces the load on your hosting server and makes the website faster and more efficient.

Wp Rocket CDN Settings

With WP Rocket, you can enable CDN on your WordPress website with a single click. If you already have a CDN service, first allow a content delivery network.

Then copy the CDN CNAME given to you by your CDN provider, enter it in the CDN CNAME field, and click on Save Changes to apply CDN on all your server’s static resources.

Exclude Files From CDN: If you want some server’s static resources files to load locally instead of the CDN server. Then just the file’s URL, and it is stripped automatically. Usually, these files come from some WordPress plugins to disregard cross-domain load. You don’t need to exclude files from CDN most of the time.

Note: If you are using Cloudflare CDN, you don’t have to add your CNAME here since Cloudflare doesn’t serve assets from a CDN URL like other CDN providers like Stackpath CDN, RocketCDN, etc.

WP Rocket owns Rocket CDN, and it’s completely optimized with all WP Rocket settings. If you are looking for the Best CDN for your website, Rocket CDN is the best option.

Step 10: WP Rocket Heartbeat Settings

WordPress Heartbeat allows you to communicate with your server when you’re logged into the WordPress admin panel. Heartbeat functionality shows other authors that another user is editing a post. Using WordPress Heartbeat API, some plugins show you notifications in real-time.

WordPress Heartbeat functionality uses the wp-admin/admin-ajax.php file to make AJAX calls. When you check your website loading time, If you notice a significant amount of POST requests by the admin-ajax.php file, this means that you need to limit the work of Heartbeat or stop it completely.

Wp Rocket Heartbeat Settings

With WP Rocket, you can control the WordPress Heartbeat to reduce high CPU usage. By first enabling the Control Heartbeat checkbox, you can either Reduce activity, Disable it or Do not limit the WordPress Heartbeat.

You can altogether disable Heartbeat if you’re the only person working on your site at a time. When you choose to Reduce activity, Heartbeat frequency will be reduced from one hit per 1 minute to one hit per 2 minutes.

Note: Disabling WordPress Heartbeat completely could disable some plugins and theme functionality that rely on it. That’s why I Reduce activity on the backend.

Step 11: WP Rocket Add-ons settings

Wp Rocket Add-ons

WP Rocket offers several Add-ons to optimize third-party scripts like Google Analytics, Facebook Pixel, Varnish, Cloudflare CDN, & Sucuri. Let’s check why you need to enable this WP Rocket add-on to perform better.

1: WP Rocket Google Tracking Add-On

Note: This option is not available on WP Rocket’s latest versions.

When you use Google Analytics to track your website traffic, those files are hosted from Google’s servers. It’s slow to your website loading time, and you get a “Leverage browser caching” warning on you to test your website performance.

leverage browser cache

Since you cannot apply caching on Analytics files, the solution hosts Analytics files locally on your domain or CDN. WP Rocket Google Tracking Add-on optimizes those files.

After enabling the Google Tracking Add-on, you will no longer see the “leverage browser cache” warning on those particular files.

This Add-on currently only works with the Google Analytics tracking code. And WP Rocket recommends the MonsterInsight analytics plugin to optimize your website performance.

2: WP Rocket Facebook Pixel Add-on

Note: This option is not available on WP Rocket’s latest versions.

Facebook Pixel is an official analytics tool that helps you measure, target, and enhance your Facebook ad campaigns. Using a Facebook pixel on your site will cause Leverage browser caching warnings in performance testing tools like GtMetrix and PageSpeed Insights.

Facebook leverage browser cache

The WP Rocket Facebook Pixel Add-on resolves this by storing the tracking files on your server and applying browser caching to optimize performance.

If you are not running Facebook ads, you do not need to enable Facebook Pixel add-ons. However, if you promote your WordPress site on Facebook by Advertising, you should use Facebook pixel to check data and allow this add-on.

3: WP Rocket Varnish Add-on

Varnish Works as an HTTP reverse proxy cache or cache accelerator to speed up delivery with a factor of 300 – 1000x, depending on your server architecture. It works on your hosting server’s side and stores all its responses on the client’s server. A varnish cache server is faster than the origin server, and it helps you decrease your website’s Time To First Byte.

Wp Rocket Varnish Cache

Suppose your hosting server uses a Varnish cache to speed up websites. Then enable the WP Rocket Varning Add-on to purge the Varnish cache automatically whenever the WP Rocket cache is purged. However, if you’re unsure about the varnish cache, you need to ask your hosting support team.

3: WP Rocket Cloudflare Add-on settings

If you’re using Cloudflare CDN on your website, only then enable this option.

This add-on simply provides a convenient way to configure Cloudflare settings for better performance. If you use the WP Rocket Cloudflare add-on, you do not need to use the Cloudflare plugin to configure settings.

Wp Rocket Cloudflare settings

First of all, enable the Cloudflare add-on. Then click the Modify Options button, and It will take you to the Cloudflare tab. Here you need to enter your Cloudflare Global API Key, Zone ID for your domain, and Cloudflare email address (You can find all details on your Cloudflare dashboard).

Development mode: Development Mode temporarily allows you to disable Cloudflare’s caching and minification features. Enable it when making a lot of code changes to your site.

Optimal Settings: I highly recommend enabling these options to enhance Cloudflare’s performance with WP Rocket. The optimal settings option helps you set Standard Cloudflare’s caching level, Deactivate Rocket Loader, Activate Cloudflare files minification features, etc.

Relative protocol: You can only use this option using Cloudflare’s Flexible SSL feature. Otherwise, disable it.

Clear All Cloudflare Cache Files: The Cloudflare cache will be automatically purged whenever you clear WP Rocket’s cache. It’s unnecessary to press this button every time to clear the cache.

4: WP Rocket Sucuri Add-on

Using the Sucuri WordPress Website Firewall to secure your website, you should enable the WP Rocket Sucuri add-on to optimize your performance. If you activate the Sucuri add-on, each time WP Rocket clears its cache, the Sucuri Firewall cache will also be removed automatically.

Wp Rocket Sucuri Add-on

First of all, enable the Sucuri add-on, click the Modify Options button, and take you to the Sucuri tab. Here you need to enter your Sucuri Firewall API key (for the plugin); you can find API Key from your Sucuri dashboard. Finally, click Save Changes.

Step 12: WP Rocket Image Optimization settings

High-quality unoptimized Images are one of the biggest drains on a website’s overall loading time. An unoptimized image will still drag down your page loading time even with WP Rocket caching and a CDN.

Imagify Image Optimization by Wp Rocket

WP Rocket recommends their Imagify plugin to optimize images. But there are many best image compression plugins available (Recommendation: ShortPixel), including Imagify for your lossless image compression. It helps you perform a bulk optimization of all the files in your Media Library.

Imagify is a freemium plugin, and you can optimize up to 200 images per month for free. Imagify also supports the latest WebP image format to increase image loading time.

ShortPixel Plugin Settings

I use the ShortPixel Image Optimizer plugin to optimize images; both plugins offer similar features. ShortPIxel costs me $9.99 one time for 10k image optimization & a WebP image converter. Deal alert: With our ShortPixel coupon code, you’ll get an extra 50% image credit on all their premium plans.

Step 13: WP Rocket Tools Tab (Import/ Export Settings)

The WP Rocket settings tools tab helps you manage the plugin import/ export settings and version.

Wp Rocket Tools Tab

Export Settings: Export settings to use the same WP Rocket settings on multiple sites. If you press the Download Settings button, your current WP Rocket settings A JSON file downloaded to your computer.

Import Settings: If you want to save time on configuring WP Rocket. Then browse for the WP Rocket JSON file on your computer, and then press the Upload File and Import Settings button to import all WP Rocket settings.

Rollback: If you face any types of issues with the latest WP Rocket version. You can Rollback to the previous major version of WP Rocket by pressing the Reinstall Version button. The previous WP Rocket version will instantly be downloaded and installed on your website.

That’s it for now. I’m currently using WP Rocket v3.8.3. In the future, when WP Rocket launches new features, I will update this post as soon as possible. So bookmark this post.

Hosting & Theme recommendation: If you want a perfect score on your Google Core web vitals test, you need Good hosting with a lightweight theme. I recommend you to use CloudWays managed WordPress hosting GeneratePress WordPress theme to get the best results.

Final Note on Best WP Rocket Settings

WP Rocket is the #1 WordPress cache plugin for its speed optimization features. I’m using WP Rocket on my website because it reportedly delivers excellent results with minimal effort.

You need the WP Rocket cache plugin to optimize your website loading time.

WP Rocket also offers its users lots of helpful speed optimization documentation, including video guides, to assist you in improving your WordPress website loading times.

I hope this guide helped you learn how to install and configure WP Rocket plugin settings on your WordPress website. If you are not using WP Rocket, What are you waiting for? They offer 14 days refund policy.

Have you used WP Rocket on your WordPress website? Share your experience with other users to improve their website loading time. If you feel I left out some WP Rocket cache plugin settings & optimization information? Please let me know ASAP in the comment section.

You may also like:

Thank you. Have a nice day.

Sayan Samanta

Hello there! My name is Sayan Samanta, and I'm an experienced blogger and affiliate marketer. I've spent years perfecting the art of building WordPress blogs that generate revenue. I specialize in creating easy-to-follow DIY guides on WordPress, hosting, site optimization, and more. If you'd like to connect with me, you can find me on X. And if you feel like supporting my work, you can always buy me a coffee.

Disclosure: We support our content through reader contributions. This includes some affiliate links, which means I may earn a commission without any extra cost to you. This helps us offer this guide to you for free. Please note that I only endorse products and services that I have personally used.

4 thoughts on “Best WP Rocket Settings to Pass Core Web Vitals (2024)”

Leave a Comment