Best WP Rocket Settings for 2024 (To Pass Core Web Vitals)

Best WP Rocket Settings

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.

If you’re using WordPress, then WP Rocket cache plugins can help you to pass core web vitals scores & improve overall user experience within 5 minutes. In this article, we share the Best WP Rocket settings you can use on your website to get the best results possible. 

Everyone uses different themes, plugins, & hosting configurations on their website. Enabling all WP Rocket settings can break your site design without optimizing your site performance. We compile the most useful and commonly used WP Rocket settings, that work with all types of websites and basic feature explanations. 

So, let’s get started. 

1: WP Rocket Dashboard

Here, you can get general information about your WP Rocket and RocketCDN subscription, and expiration date. I turned off the Rocket analytics option, it collects your website’s basic data like server type, active plugins, themes, PHP version, etc. It’s completely up to you whether you want to share your website information anonymously. You can also Remove all cached files and Used CSS Cache from the dashboard. 

WP Rocket Dashboard

2: File Optimization Settings

This section contains WP Rocket’s optimizations for CSS and JavaScript files on your website. Here, I recommend you to activate WP Rocket options one at a time, not everything at once. After each activation, make sure you check your website in incognito mode. By doing this you will be able to see immediately if a particular option causes any issue. 

For most sites, minify CSS/JS should be ON, but combine CSS/JS should be OFF, and remove unused CSS should be ON. Defer & delay JavaScript execution should be ON and can improve multiple PageSpeed recommendations. Right now, WP Rocket also automatically turns off combined JS files, when you enable the delay JavaScript execution option. Now, let’s understand every file optimization option.

WP Rocket CSS settings

Minify CSS files: ON – It reduces overall 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.

Excluded CSS Files: if enabling a minify CSS setting breaks your website design. View your source code, by using the browser developer tool, identify which plugin caused this error, and enter it here. You can read the WP Rocket guide on Resolving issues with Minify CSS files for better understanding.

Optimize CSS Delivery: ON – It 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. 

Remove Unused CSS: ON – Unused 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.  

Load CSS Asynchronously: OFF – If your website design breaks after enabling the “Remove unused CSS” option, enable the “Load CSS Asynchronously” option. After enabling this option, open test your website Critical Path CSS Generator tool, copy the code, then paste it into fallback critical CSS section. Read the WP Rocket guide.

Note: on a recent update WP Rocket removed the combine CSS option. Which is a good decision in my opinion. 

WP Rocket JS settings

Minify JavaScript Files: ON – It automatically compacts JS code to ensure that the files are parsed through and delivered as quickly as possible. JavaScript execution time is closely related to the FID and INP scores, which measure the page’s interactivity and responsiveness. That’s why you should enable this option to reduce size of these JS scripts as much as possible.

Combine JavaScript Files: OFF – It automatically combines your website all JavaScript files and inline scripts into one single JavaScript file. Combining JavaScript Files helps you reduce your website HTTP requests and improve your website TTFB. However, Combining JS files can also cause issues when using HTTP/2 and HTTP/3 servers. 

Load JavaScript Deferred: ON – It allows your site to load JavaScript after the page has finished parsing and eliminates render-blocking resources. All your website JavaScript files will be loaded with the defer attribute to improve your PageSpeed score by enabling these options.

Delay JavaScript Execution: ON – It automatically reduces third-party code by delaying JavaScript until user interaction. Delaying JavaScript Execution will enhance your website’s initial load time & PSI score. You can also exclude certain elements located in the viewport that need to appear immediately header, menu, etc.

3: Media 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 settings

Lazy Load Images: ON – It delays 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. Here enable all options & sub-options. 

If you’re using background images enable the “CSS background images” options, it helps you to avoid defer offscreen image errors on PSI. Next, the “iframes and video” and “Replace YouTube iframe with preview image” option helps you relapse all types of videos with preview images since embedded videos are very heavy.

Excluded images or iframes: Enter your logo, features image, or sidebar images you don’t want to use Lazy load features. WP Rocket can exclude images by URL, class, or attribute.

Image Dimensions: ON – 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. This fixes layout shifts as well as uses explicit width and height on image element errors in PageSpeed Insights.

4: 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: ON – It allows 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. 

Preload Links: ON – It 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 code, 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. 

Most of these are already delayed with “Delay JavaScript execution” option, so there’s no reason to prefetch them. The only third-party domains you should prefetch are the ones not delayed by WP Rocket. Don’t add too many URLs, it can negatively impact speed. Here’s the WP Rocket guide on Prefetch DNS request.

Preload Fonts: Preloading fonts features improve WordPress site loading time and perceived performance. However, if you’re using the “Remove Unused CSS” option then you don’t need to add your website font URL. Otherwise, you’ll need to enter URLs to preload fonts manually.

Note: Only self-hosted fonts can be preloaded by WP Rocket and avoid preloading too many fonts. To find font URLS, test your website on GtMetrix, on Waterfall chart you can view all your website font files.

5: Advanced Rules Settings

Most of the time, you don’t need to change anything here at all. However, in some cases where you need to ensure some pages are never cached, like cart widgets specifically, something related to eCommerce checkout pages, or a specific cookie need to be avoided. 

WP Rocket Advanced Rules Settings

Cache Lifespan: It allows you to set the cached page’s maximum age. A lower Cache Lifespan means the cache will refresh more frequently and Increase CPU usage. WP Rocket recommends every user set 10 Hours of Cache Lifespan, but I personally prefer to use 24 Hours of Cache Lifespan.

Never Cache URLs: If you want to exclude some individual URLs from caching like shopping cart, checkout page, etc. Just enter the URL of the page like https://yourwebsite.com/page/ or part after the domain name like /page/. Either way will work.

Never Cache Cookies: prevent caching in the presence of the specified cookie. 

Never Cache User Agent(s): prevent cached pages from being served on specific device types and in certain browsers. You can also prevent cached pages from search engine bots & User Agents.

Always Purge URL(s): 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 String(s): A query string is where you have a URL that contains a question mark like (?search=WordPress). 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)

6: 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 settings

Revisions: ON – Every time you hit the “Publish” button, a post revision is stored. 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 revisions, it’s completely up to you whether you want to take backup on post revisions.

Auto Draft: OFF – WordPress Gutenberg editor automatically saves post versions if you don’t hit Publish. if you exit out of your browser accidentally, it saves your work automatically.

Trashed Posts: ON – Enable if you don’t need trashed posts anymore.

Comments Cleanup: ON – remove all spam & deleted comments from the database.

Transients Cleanup: ON – 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: ON – 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: ON – How often do you want to clean your database with WP Rocket? I set the “Weekly” options, but you can change it to daily, weekly, or monthly.

7: CDN Settings

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

Enable Content Delivery Network: Depends. If you have a subscription from a CDN service provider. Enter your CDN URL in WP Rocket’s CDN CNAME(s) field. Then WP Rocket automatically serves all of the static files (CSS, JS, images) to the CNAME(s) you provide. Most of the people I know use BunnyCDN with WP Rocket. 

If your hosting provider offers CDN services you don’t need to change anything here. For example, Rocket.net offers Cloudflare Enterprise for free and set up automatically. CloudWays offers Cloudflare Enterprise for $5/month, etc.

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: WP Rocket owns RocketCDN and I don’t recommend you to use it. It’s very expensive, with no support for full-page caching, image optimization, or security features. If you’re looking for CDN, then use Cloudflare or BunnyCDN for the best performance. 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 BunnyCDN, RocketCDN, etc.

8: 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

I recommend disabling Heartbeat in the backend and frontend, then reducing activity in the post editor for auto draft and similar functions. 

9: Add-Ons

WP Rocket offers several Add-ons to optimize third-party scripts. Only enable add-ons you use on your website.

WP Rocket Add-ons

User Cache: OFF – only enable if you have logged-in users (like a membership site). Otherwise, disable this option. It creates a dedicated set of cache files for each logged-in WordPress user. However, enabling this can also increase CPU usage.

Varnish: Only turn on if your hosting service uses Varnish. 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. Varnish cache server is faster than the origin server, and it helps you decrease your website’s TTFB. Most of the time, WP Rocket automatically detects if your server using Varnish or not. You can ask your hosting provider if they are using Varnish cache.

WebP Compatibility: Disable in most cases. Even if you use WebP image format, it automatically disables when you’re using CDN or different image optimization plugins like ShortPixel, Optimole, etc. Note: WP Rocket does not create WebP images for you. You’ll need an additional plugin such as Imagify, ShortPixel, or Optimole to handle WebP image conversion.

Cloudflare: If you’re using Cloudflare CDN on your website, only then enable this option. After enabling this option, click on 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). 

WP Rocket Cloudflare settings
  • Development mode: OFF – 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: ON – 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: OFF – You can only use this option using Cloudflare’s Flexible SSL feature. Otherwise, disable it.
  • Clear All Cloudflare Cache Files: Automatically purged whenever you clear WP Rocket’s cache. It’s unnecessary to press this button every time to clear the cache.

Sucuri: Only enable if you’re using the Sucuri firewall to protect your website. Click on modify option to enter your Sucuri Firewall API Key. If you activate the Sucuri add-on, each time WP Rocket clears its cache, the Sucuri Firewall cache will also be removed automatically.

10: Image Optimization Settings

Unfortunately, WP Rocket doesn’t optimize images and it only enables Lazy load on images. WP Rocket recommends their Imagify plugin to optimize images. However, I found Shortpixel & Optimole do a better job at Image optimization & Webp image conversion.

Imagify doesn’t offer features like mobile resizing, AVIF conversion, & Serve images from CDN. it’s completely up to you which image optimization plugin you want to use. I recommend you to use CDNs base image optimization plugins (Like ShortPixel & Optimole) since they optimize images “on the fly” without taxing your server resourses.

11: Tools

Here you can manage the WP Rocket plugin import, export settings, and version.

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.

Final Thoughts on WP Rocket Settings

WP Rocket is currently used by over 3 million websites, which makes them the #1 WordPress cache plugin on the WordPress marketplace. I hope you used our WP Rocket settings to improve your core web vitals score without breaking any website design.

If somehow, you’re not satisfied with WP Rocket’s performance, you can try using FlyingPress, Perfrmatters, or Litespeed Cache plugin to optimize your website.

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, Kinsta, or Rocket.net managed WordPress hosting with GeneratePress or Astra WordPress theme to get the best results.

That’s all for now. If you need any help regarding WP Rocket let me know in the comment section. You can check out WP Rocket speed optimization documentation, including video guides, to assist you in improving your WordPress website loading times.

If you’re using WP Rocket on your 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 in the comment section.

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.

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 for 2024 (To Pass Core Web Vitals)”

Leave a Comment