Are you looking for the best WP Rocket settings to speed up your website and pass Google’s Core Web Vitals in Google PageSpeed Insights?
WP Rocket currently powers over 1,700,000+ websites and is one of my top recommended caching plugins to supercharge your website speed.
With so many options to choose from between WordPress caching plugins, it’s hard to know what WP Rocket settings should be enabled or disabled, and whether or not you have two caching plugins doing the same thing.
One of my favorite things about WP Rocket is that it takes care of everything in one single plugin, so you don’t need to download a bunch of optimization plugins which only increases the chance of hurting your website speed due to conflicting plugins trying to do the same thing.
This WP Rocket best settings tutorial will guide you through each area and tell you exactly which settings you should apply depending on your situation so that you can have a very fast WordPress site that passes Google’s Core Web Vitals which will get you a precious Google ranking boost.
One important thing to keep in mind – the WordPress hosting you use is the most important factor for having a fast WordPress website.
If you are using slow WordPress hosting, your site will be slow no matter how many optimizations you do to it.
Therefore, head over to the Start Blogging 101 hosting page to determine if you’re using slow hosting and if you could benefit from upgrading to higher-performance hosting.
This WP Rocket tutorial is one of the most comprehensive guides on the web right now. It’s a longer one, but I encourage you to use the Table of Contents below and follow along as you need.
So, are you ready? Let’s speed up your website.
Use the best WP Rocket settings guide below to jump around as you need:
Start Blogging 101 is reader-supported. If you purchase through a link on my site, I may earn a commission. Learn more
WP Rocket Speed Tests
First and foremost, let’s talk about how fast your website can be if you use the correct setup along with the best WP Rocket settings that I’ll go over.
With my recommended WP Rocket plugin settings, you can pass Core Web Vitals for both desktop and the mobile tab in Google PageSpeed Insights which is the hardest one to optimize for.
Here’s a GTMetrix report ran on this exact WP Rocket tutorial which passes all Core Web Vitals with very fast speeds.
You should only be using Google PageSpeed Insights to test your Core Web Vitals. I don’t recommend using GTMetrix for your Core Web Vitals scores.
Getting high scores like these is very easy by doing four things:
- Using fast, reliable hosting (See hosting page)
- Using a lightweight, customizable WordPress theme (I highly recommend the Kadence Theme or you can read my full Kadence Theme Review)
- Not using third-party page builders and using the built-in WordPress editor (Gutenberg) to build your page (Join my WordPress Without Page Builders Facebook Group)
- Using a high-performance caching plugin (WP Rocket)
If you want to learn exactly how to make your site this fast and pass Core Web Vitals which will get you a Google ranking boost, then check out my 7 Days to WordPress Speed Mastery email course. It’s 100% free as a way of saying thank you for reading my content and supporting me. 🙂
Best WP Rocket Settings Overview
As soon as you install and activate WP Rocket, the plugin will apply a number of “safe” default settings which should work for the vast majority of websites.
However, there are still more settings we can configure to make your site even faster.
If you don’t want to read through this entire guide, I went and compiled all of my recommended WP Rocket settings in a condensed overview which should work for most WordPress sites.
The WP Rocket dashboard is pretty basic.
Here, you can see which license you have. I currently have the Infinite license so I can use it on as many websites as I’d like because it’s the caching plugin I recommend for basically any site.
You can also see your Expiration Date of when your WP Rocket license will expire.
After your WP Rocket license expires, WP Rocket will still work, but you won’t receive any support or future updates.
I would highly encourage keeping your license renewed each year if you’re using WP Rocket because each update is crucial in making sure your site doesn’t break.
On the dashboard, you can also get RocketCDN which is their own CDN for an additional cost.
Personally, I wouldn’t recommend RocketCDN as there are other better CDNs that integrate perfectly with WP Rocket that I discuss in the CDN section.
- Enable caching for mobile devices – Enabled
- Separate cache files for mobile devices – Disabled
- Enable caching for logged-in WordPress users – Disabled (unless you use a theme or a plugin that has users log into your site)
- Cache Lifespan – 10 hours. Your cache will expire and be rebuilt every 10 hours which works for the vast majority of users.
These are the best WP Rocket settings for the cache section assuming that you’re using a mobile-responsive WordPress theme (which should be nearly all of them) and don’t allow users to log in to your site.
Mobile Cache – You should enable caching for mobile devices (the first checkbox). This will speed up your site for your mobile visitors. “Mobile” in WP Rocket terms refers to phone users only. Do not enable “separate cache files for mobile devices” unless you have a dedicated theme or plugin only for mobile devices (you probably don’t). Also, if WP Rocket detects any of these specific themes/plugins, it will enable that option by default for you and be grayed out. When the “separate cache files for mobile devices” option is enabled, WP Rocket serves an entirely different cache file to phones than it does to tablets or desktop devices.
User Cache – This option creates a dedicated set of cache files for each logged-in WordPress user. Leave this option disabled unless you use something like a membership theme or plugin where users log in and each user has different content that they see.
Cache Lifespan – Here is where you can specify the time after which the global cache is cleared. The default is 10 hours. Cache files that are older than the time you have specified will get deleted. If you have “Preloading” enabled (it gets enabled by default), your cache will then be preloaded automatically which means there’s nothing you’ll have to do. You can always manually clear the cache whenever you want. If you notice that issues appear periodically, you may have to reduce your lifespan to less than 10 hours.
3. File Optimization
- Minify CSS files – Enabled
- Combine CSS files – Disabled
- Optimize CSS delivery – Enabled – Choose “Remove Unused CSS” option for best performance, but may cause issues. If you see issues, choose “Load CSS Asynchronously” which is the safest option
These are the best settings for the File Optimization section within WP Rocket, but you have to be careful with a few of them.
The File Optimization section contains a gold mine of optimizations that will help you pass Core Web Vitals and will take care of a lot of the speed suggestions in Google PageSpeed Insights and GTMetrix.
Read on to get an explanation of each WP Rocket File Optimization setting below.
Minify CSS and JS Files
Minifying your CSS and JS files is generally safe and shouldn’t break your site.
However, you will see a warning when you enable these options that says “This could break things! If you notice any errors on your website after having activated this setting, just deactivate it again, and your site will be back to normal.”
After enabling these options, click through your site and make sure everything still looks good.
Combine CSS and JS Files
If you enable the Minify CSS files and Minify JS files options, then the option to Combine CSS files and Combine JS files will light up.
I personally would recommend disabling both the Combine CSS files and Combine JS files.
Generally, if your hosting supports and uses HTTP/2 (which almost all of them should), you want to disable both the Combine CSS files and Combine JS files options.
Plus, with HTTP/3 coming on the horizon, you will have better performance by not combining your files.
The reason for this is because HTTP/2 allows for all the small files to download simultaneously which means they all load up at the same time without each file slowing the other one down.
If you combine all your files into one big file, your server will generally take longer to download all those versus just leaving them separate.
Also, combining all those files means that something could go wrong and break on your site because scripts aren’t always loaded in the correct order.
Exclude CSS or JS Files
- WP Rocket – Resolving issues with CSS Minify / Combine
Optimize CSS Delivery
The WP Rocket Optimize CSS Delivery option helps address the “Eliminate render-blocking resources” suggestion in Google PageSpeed Insights for your CSS files.
It does this by automatically generating the critical path CSS needed to render the visible part of your website.
This means that WP Rocket goes and figures out only the minimum necessary CSS needed to load all your content above the fold for each public post type (posts, pages, products, etc.).
You want to enable the option to “Optimize CSS delivery” in WP Rocket.
After you enable the “Optimize CSS delivery” option, you will have a choice between two options: “Remove Unused CSS” or “Load CSS Asynchronously.”
For the best performance, you should choose the “Remove Unused CSS” option.
Choosing to remove unused CSS will address the “Remove unused CSS” suggestion in Google PageSpeed Insights.
Keep in mind that this option will remove and not load certain CSS, so you’ll want to check your site and make sure that everything looks as it should.
If something is broken with the “Remove Unused CSS” option, then you should choose the “Load CSS Asynchronously” option instead which is the safest choice.
This option will first generate the critical path CSS needed. Then, all of the remaining CSS files get loaded asynchronously, deferred, without render-blocking which is why this helps address the “Eliminate render-blocking resources” suggestion in Google PSI.
- Minimize Main thread work
- Total blocking time
- Time to Interactive
- First contentful paint
This is why I highly encourage not combining your CSS and JS files because your site will likely be faster (assuming it’s using HTTP/2) and your site will have a lower chance of breaking.
I switched from WP Rocket to FlyingPress in 2021 and haven’t looked back. Feel free to read my FlyingPress best settings tutorial which goes over everything.
- Enable for images – Enabled
- Enable for iframes and videos – Enabled
- Replace YouTube iframe with preview image – Enabled
- Add missing image dimensions – Enabled
The WP Rocket Media section will greatly save on your server’s resources and your page’s fully loaded time by lazy loading images, iframes, and embedded YouTube videos.
The “Add missing image dimensions” setting will help lower your Cumulative Layout Shift (CLS) scores by adding missing dimensions to your images (if needed).
One important note is that WP Rocket itself does not create WebP versions of images. You will need to use another plugin such as ShortPixel to do that for you. I’ll discuss that more in the Enable WebP Caching section.
The LazyLoad section in WP Rocket will fix the “Defer offscreen images” suggestion in Google PageSpeed Insights.
Lazy loading is used to delay the loading of images, iframes, and videos until the user scrolls down on your page and actually needs to see them.
This significantly helps your site out in several ways. It will help reduce the initial load time of your pages, the number of initial HTTP requests, and also save server resources since images will only be requested and downloaded if the user scrolls to them.
You should enable all three checkboxes in the LazyLoad section of WP Rocket:
- Enable for images
- Enable for iframes and videos
- Replace YouTube iframe with preview images
NOTE: WordPress introduced native lazy loading with version 5.5. This native WordPress lazy loading will automatically be disabled when WP Rocket’s LazyLoad is active, so there’s nothing you have to do.
The “Replace YouTube iframe with preview images” feature will drastically help increase your page speed and Core Web Vitals scores if you use embedded YouTube videos on your site.
This feature will show a preview image in place of your video rather than loading all of the bloated code that comes with an embedded YouTube video.
Then, if the user clicks play, all of the code will be run then.
If you use any type of video on your WordPress website, whether it be YouTube videos or course videos with an LMS using something like Vimeo, then you should definitely check out my Presto Player plugin review.
Presto Player is the only WordPress video player plugin you need. It takes any type of video you’d need on your site and supercharges it along with including performance options to significantly speed up your website speed.
Add Missing Image Dimensions
The “Add missing image dimensions” feature in WP Rocket helps fix the “Use explicit width and height on image elements” suggestion in Google PageSpeed Insights and GTMetrix and this will also significantly help fix your Cumulative Layout Shift (CLS) scores for Core Web Vitals.
You should enable the “Add missing image dimensions” setting in WP Rocket.
How does adding the missing image dimensions help fix your Cumulative Layout Shift (CLS) scores?
When a page goes to load, if there is no explicit width and height specified for an image, there will be no space reserved for that image which causes all of the content below the image to shift when the image finally loads in. This increases your CLS number and leads to a poor experience for your users.
By enabling the “Add missing image dimensions” setting, WP Rocket will go through and automatically apply all the correct image widths and heights for applicable images.
In turn, this will reserve the correct amount of space on your page when it goes to load. Now, when the image finally loads in, none of your content shifts because there was a blank white box already in place for the image.
This will decrease your CLS number and lead to a great experience for your users.
Enable WebP Caching
You should enable the “Enable WebP caching” setting in WP Rocket ONLY if you’re using WebP images on your WordPress site.
WebP images are supported on every major browser, so you should be using them.
If you want to learn more, you should read more about WP Rocket WebP compatibility.
NOTE: WP Rocket does NOT create WebP images for you (I wish it did). They suggest you use the Imagify plugin to do this since it was created by their parent company. I’m not a huge fan of Imagify. Most people prefer to use ShortPixel instead. ShortPixel is also starting to allow converting images to AVIF format which is even better than using WebP.
Using a good image compression plugin such as ShortPixel to create WebP or AVIF versions of your images will fix the “Serve images in next-gen formats” suggestion in Google PageSpeed Insights.
WP Rocket automatically detects some common image compression plugins and will enable the WebP caching setting for you if you’re using:
- ShortPixel Image Optimizer
Another option to serve images in next-gen formats such as WebP would be to use an excellent CDN such as Bunny.net to serve your assets and hook it up through WP Rocket. More on that in the CDN section.
Also, WebP images will be natively supported in WordPress 5.8 meaning you’ll be able to upload WebP files directly to your WordPress Media Library. Even better, the media component team is looking into WordPress doing the conversion to WebP on uploaded images so that WebP will be used as the default format for sub-sized images. Now THAT would be cool!
Until WordPress (hopefully) adds that feature, you can manually convert your images to WebP using awesome web-based tools such as Squoosh or export your images out as WebP using image editing tools.
- Activate Preloading – Enabled
- Activate sitemap-based cache preloading – Enabled
- [SEO Plugin] XML sitemap – Enabled
- Enable link preloading – Enabled
- Prefetch DNS Requests – Tells the browser to perform the DNS resolution of third-party sites before its needed.
- Preload Fonts – Enter fonts on your site to be preloaded.
You can think of preloading in WP Rocket as you telling the browser that certain resources are going to be needed ahead of time which can help improve your website speed and fix some preloading suggestions in Google PageSpeed Insights. (See “How is the WP Rocket cache preloaded?“)
For example, say we know that Google Fonts are going to be loaded on our site. We can preload the request to Google Fonts which will tell the browser that we’ll need Google Fonts before the browser even gets the request.
This helps speed up your WordPress site. It’s almost like giving your site fortune-telling powers. 🔮
These are the WP Rocket best settings for the Preload section. I’ll discuss each section in more detail below.
When you install WP Rocket for the first time, the “Activate Preloading” setting will be enabled by default, and your site’s home page and links found on it will be preloaded immediately to ensure that your site is fast right away.
You should enable all of the checkboxes in the “Preload Cache” section of WP Rocket:
- Activate Preloading
- Activate sitemap-based cache preloading
- [SEO Plugin] XML sitemap (if using a SEO plugin)
If you use an SEO plugin such as Rank Math, SEOPress, The SEO Framework, All-in-one-SEO, or Yoast SEO, the sitemaps that are generated by those plugins are detected, and checking the “Activate sitemap-based cache preloading” will use those sitemaps for preloading.
If you don’t use one of those plugins or you want to specify sitemaps for preloading, you can enter the URLs in the “Sitemaps for preloading” section.
Enable Link Preloading
You should enable the “Enable link preloading” setting in WP Rocket.
Enabling this option will improve the perceived loading time of pages for a user who is navigating around on your site.
How does enable link preloading work? If a user hovers over (or touches) a link on your site for 100 ms or more, the HTML of that page will start to be fetched in the background. That way, when the user actually does click or tap the link, the page will appear to load instantly.
Pretty neat, huh?
Keep in mind that this setting only improves the user experience and does NOT improve any page speed suggestions in Google PageSpeed Insights or GTMetrix.
That being said, this is an extremely nice feature for giving your users a positive experience on your website which is always a great thing.
Prefetch DNS Requests
If you use third-party content on your website (for example, Google Fonts, Google Analytics, AdSense, Google Tag Manager, YouTube, Gravatars, etc.), you may want to add the origin domain to the “URLs to prefetch” box.
What prefetching DNS requests in WP Rocket does is that it tells the browser to perform the DNS connection before the file is needed which can slightly boost your page loading time.
How do you use DNS prefetching in WP Rocket?
- Find the third-party domain you’re loading on your site
- Remove the
httpsand keep the double slash
- Only enter the top-level domain of the third-party site
So, for example, if you have a request to Google Fonts that looks like this:
You would enter it in the “URLs to prefetch” box, like this:
It’s that simple!
The Preload Fonts feature in WP Rocket allows you to tell the browser to start downloading fonts that it otherwise wouldn’t realize until much later, usually due to the font being referenced within a CSS file. (See Preload Fonts WP Rocket Documentation).
NOTE: To improve the Largest Contentful Paint metric for Core Web Vitals, Preloading Fonts will be disabled by WP Rocket automatically on pages where Optimize CSS Delivery is active.
Which fonts should I preload? After running your page through Google PageSpeed Insights, you may see a speed suggestion that says “Preload key requests.”
If you open this up, you should see any font files that need preloading. They may look like “…fonts/custom-font.woff2“.
- Right-click on the recommended font in Google PSI and copy the URL
- Paste the URL into the “Fonts to preload” box in WP Rocket
Keep in mind that the font MUST be hosted on your own domain, or your CDN’s domain.
You cannot enter externally hosted fonts such as Google Fonts here. As of WP Rocket version 3.7, Google Fonts are automatically optimized, so there’s nothing you have to do.
If you only use Google Fonts (that are not locally hosted) or you use system fonts, you do not have to do anything with the Preload Fonts section.
Also, DO NOT PRELOAD EVERY FONT! Only preload fonts that would delay the rendering of your pages. If you preload a bunch of fonts that aren’t necessary for the rendering of your page, you’re actually going to slow your site down more. So, be careful!
6. Advanced Rules
If you use an eCommerce plugin on your WordPress site that is not supported by WP Rocket, you can use the WP Rocket Advanced Rules section to help skip caching based on pages, cookies, or user agents.
That being said, if you use any of the major WordPress eCommerce plugins such as WooCommerce or BigCommerce, WP Rocket is already compatible with all of those.
WP Rocket automatically excludes the “Cart,” “Checkout,” and “My Account” pages from the cache for these plugins:
- Easy Digital Download
- iThemes Exchange
Therefore, if you use any of the eCommerce plugins listed above on your WordPress website, you don’t have to add anything in your Advanced Rules in WP Rocket as it should already work as expected.
If you’re having any issues with cart widgets, caching, or other issues related to eCommerce, then check out the Using WP Rocket On Your Ecommerce Site documentation.
Never Cache URLs – Here is where you can specify URLs of pages or posts that should never be cached (enter one per line). Certain pages like custom login or logout URLs should be excluded from the cache. If you’re using one of the eCommerce plugins that isn’t supported by WP Rocket, then this is where you’d add your checkout and cart pages.
Never Cache Cookies – This option will prevent caching and optimization based on the presence of the specified cookie. This is similar to the above option, but using cookies instead of URLs. You can specify full or partial IDs of cookies that, when set in the visitor’s browser, should prevent a page from getting cached (enter one per line).
Never Cache User Agents – This option is used to prevent cached and optimized pages from being served on certain devices and in certain browsers. You can specify user agent strings that should never see cached pages (enter one per line).
Always Purge URLs – When a post or page is updated on your site, WP Rocket goes and partially clears the cache including the cache for that post or page, your home page, and related content. So, all of the common use cases should already be covered. However, you can specify URLs that you always want purged from the cache whenever you update any post or page (enter one per line).
Cache Query Strings – Cache for query strings enables you to force caching for specific GET parameters. This is only used in some very specific cases.
- Revisions – Disabled
- Auto Drafts – Disabled
- Trashed Posts – Enabled
- Spam Comments – Enabled
- Trashed Comments – Enabled
- All Transients – Enabled
- Optimize Tables – Enabled
- Schedule Automatic Cleanup – Weekly
The WP Rocket Database section allows you to clean up your database and also schedule automatic database cleanup which will optimize your site for fast loading and reduce database bloat.
That being said, you want to be aware of what each of these database cleanup options does and whether you want to clean them up or not.
These are the best WP Rocket settings for the Database cleanup and optimization section. If you are like me and use post revisions and auto drafts, then you should disable both the “Revisions” and “Auto Drafts” options so that they don’t accidentally get removed. Otherwise, feel free to enable those options to clean them up if you don’t use them.
Let’s go over each WP Rocket database optimization option in more detail.
- Post Cleanup
- Revisions – After your post or page is officially published, revisions are the older versions of your post or page that are saved.
- Auto Drafts – As you’re creating or editing a post or page, automatic drafts get saved of your content along the way so that you don’t lose your work.
- Trashed Posts – These are posts that you’ve deleted and put in the trash.
- Comments Cleanup
- Spam Comments – These are comments that have been marked as spam, either by a plugin or manually yourself.
- Trashed Comments – These are comments that have been deleted and put in the trash.
- Transients Cleanup
- All Transients – Transients are temporary options that are created by plugins and are safe to remove. Transients are frequently re-created by plugins so you may not see the number hit zero even after removing.
- Database Cleanup
- Optimize Tables – This will optimize the tables in your database so they are running efficiently without any bloat.
- Automation Cleanup
- Schedule Automatic Cleanup – Here you can choose how frequently you want your database to be cleaned up and optimized by WP Rocket. You can choose “Daily,” “Weekly,” or “Monthly.” I would recommend choosing “Weekly” so your database stays optimized every week.
After you run the database cleanup, it cannot be undone. So, before you clean up your database, especially if you’re removing post revisions, you should make sure you have a backup of your website in case you remove anything you didn’t mean to.
Most good WordPress hosts should automatically do a daily backup of your website, so you should be good, but you could always install a backup plugin such as UpdraftPlus to have backups separate from your host.
- Enable Content Delivery Network – Enabled (if you are using a CDN with WP Rocket. I recommend using BunnyCDN with WP Rocket)
- CDN CNAME(s) – Specify the CDN CNAME(s) that will be used for delivering static files
- Type of files – All files
A CDN is a content delivery network. In other words, it’s basically a number of servers that are spread all throughout the world that work together to provide fast delivery of content to users no matter where they are located.
Do I need a CDN? The answer is… it depends.
Is the majority of your website traffic in the same continent as your hosting server? If so, you may not want to use a CDN as it can actually slightly slow down your website by adding another layer.
However, if you have a decent amount of your traffic coming from all over the world, then it probably makes sense to use a CDN.
A CDN will cache the content of your website on a number of servers around the world and then when someone goes to access your website, it will pull the data from the CDN server closest to that user which will greatly speed up the time it takes for them to see your website loaded.
Which CDN should I use with WP Rocket? For the value, I personally recommend using either Cloudflare or BunnyCDN with WP Rocket rather than RocketCDN. Cloudflare offers excellent performance and security options for free while BunnyCDN provides top-notch performance that you can use to serve the static files on your website for a minimal cost. You can even use both Cloudflare and BunnyCDN together if you’d like.
Let’s go over each WP Rocket CDN option below and list the benefits of each one:
- Offers a free plan with tons of features for speed and security
- Most popular
- Does not allow you to serve your assets through a CDN URL like BunnyCDN
- Offers a service called APO (Automatic Platform Optimization) for $5/month which is an incredible feature to enhance performance for WordPress sites and can greatly reduce your TTFB for all global visitors. This site is using Cloudflare APO to serve HTML pages.
- Can be used in tandem with BunnyCDN where BunnyCDN serves your assets (CSS files, JS files, and images).
- If you decide to use Cloudflare with WP Rocket, you will set that up in the Add-Ons section, NOT here in the CDN section.
- Highest performance option and most recommended
- Paid service, but it only costs pennies per GB of data served, so it’s very affordable
- Allows you to serve your static files (JS, CSS, images) through a CDN URL so your assets could come from a URL such as “cdn.startblogging101.com“
- This site is using Cloudflare APO to serve HTML pages and BunnyCDN to serve static assets (JS, CSS, and images) for maximum performance.
- Offers an “Image Optimization” service which can automatically compress your images and serve them in next-gen formats like WebP for you. No plugin necessary!
- I wrote very easy to follow instructions to teach you exactly how to set up Bunny CDN with WordPress using WP Rocket below.
Should I use RocketCDN with WP Rocket? RocketCDN is a CDN offered from WP Rocket and you’ll see it mentioned throughout their plugin in several places. RocketCDN can be turned on very easily directly within WP Rocket and you can certainly give it a try if you would like. However, for $7.99/month, I personally believe using BunnyCDN or free Cloudflare is a much better choice which will give you better performance for less money. RocketCDN is powered by StackPath.
How to Set Up BunnyCDN With WP Rocket
For this section, I’ll show you how easy it is to set up a CDN with WP Rocket. I personally use and recommend using BunnyCDN and so do thousands of others.
Step 1 – Sign up for BunnyCDN.
Step 2 – Add a pull zone, fill out Name, Origin URL and choose Pricing Zones.
- Go to the “Pull Zones” tab and click the “Add Pull Zone” button.
- Enter the “Name” of your Pull Zone where your files will be accessible. This will be your website. For example, “startblogging101“.
- Enter the “Origin URL” of your website that you wish to accelerate. In my case, “https://startblogging101.com/“.
- Choose the “Pricing zones” where you want your data to be served. Certain geographical zones have different costs. I would recommend leaving all locations checked.
- Last, click “Add Pull Zone” to add your new Pull Zone.
Step 3 – Copy your provided “CDN Domain” in the “Installation With Third-Party Plugins” section.
- In the “Select Your Platform” section, choose “WordPress.”
- In the “Installation With Third-Party Plugins” section, copy the value next to the “CDN Domain.”
Step 4 – Paste your “CDN Domain” into the CDN CNAME(s) field in WP Rocket.
Exclude files from CDN
Here, you can specify URLs of files that should not be served via CDN if you’re using a CDN with WP Rocket (enter one per line).
The WordPress Heartbeat API provides a connection for real-time data transfer and syncing between the server and the browser.
Here are some examples of where the WordPress Heartbeat API is used:
- Autosave and revisions in the post editor
- Notifications in the WordPress admin dashboard
- Letting you know a post is locked when another editor is working on a post
- Real-time data displayed on the dashboard by eCommerce plugins
The Heartbeat API runs a set of tasks every 15-60 seconds which consumes server resources and can cause high CPU usage.
Therefore, WP Rocket offers an option to reduce or disable the Heartbeat API’s activity to help save some of your server’s resources.
You should enable the “Control Heartbeat” option in WP Rocket.
Reduce or Disable Heartbeat Activity
In this section, you have three options for various areas of your site: do not limit the activity, reduce the activity, or completely disable all activity.
Reducing activity will change Heartbeat frequency from one hit each minute to one hit every 2 minutes.
Keep in mind that disabling Heartbeat entirely may break plugins and themes that rely on using the Heartbeat API.
Here are my recommended settings for reducing Heartbeat API activity in WP Rocket:
- Behavior in backend – Reduce activity
- Behavior in post editor – Reduce activity
- Behavior in frontend – Reduce activity
If you know with absolute certainty that you have no use for the Heartbeat API in one of these areas, then you can choose “Disable” for that area.
However, simply reducing the activity in each of these areas is going to save quite a bit on your server’s resources while still allowing everything to work properly which is always a good thing.
With version 3.9, WP Rocket got rid the add-ons for “Google Tracking” and “Facebook Pixel.”
Both of these add-ons were used to help fix the Google PageSpeed Insights recommendation of “leverage browser caching” if you were using Google Analytics or Facebook Pixel on your website.
There are still a few WP Rocket add-ons offered which I will cover.
If your site is hosted with Cloudways, WP Engine, or Flywheel, your site will use Varnish for server-side caching.
WP Rocket will automatically detect the environment and enable the Varnish add-on for you.
For example, I’m using Cloudways to host this website and you can see that WP Rocket detected my hosting and automatically enabled the Varnish add-on.
If your site is hosted with SiteGround, Kinsta, or Pressable, you don’t need to enable this option because the WP Rocket cache already gets synced with their server cache.
How to Set Up Cloudflare With WP Rocket
In the Rocket Add-ons section of WP Rocket, there is an option to integrate your Cloudflare account with WP Rocket.
NOTE: You don’t need to use the WP Rocket Cloudflare add-on in order for your site to work through Cloudflare – it’s only an added convenience. If you have your site working through Cloudflare already, Cloudflare will be active on your site whether you enable the Cloudflare add-on or not. Using the Cloudflare add-on with WP Rocket simply gives you the ability to easily access some settings directly within WP Rocket.
Step 1 – Switch Cloudflare Add-on status to “ON” and then click the “Modify Settings” button.
Step 2 – Get your Global API Key from Cloudflare and paste it into WP Rocket.
- Within Cloudflare, click on your account icon in the upper-right and choose “My Profile.”
- Then, click on the “API Tokens” tab.
- Under the “API Keys” section, click the “View” button on the “Global API Key” line.
- Enter your account password and you’ll get your Global API Key. Copy it and paste it in the “Global API key” section in the WP Rocket Cloudflare section.
Step 3 – Fill in your “Account email” that you use for Cloudflare in the appropriate box in the Cloudflare add-on section.
Step 4 – Get your Zone ID from Cloudflare and paste it into WP Rocket.
- On your Cloudflare home page, choose your site.
- You’ll be on the “Overview” tab for your website. Scroll down until you see the “Zone ID” in the sidebar on the right.
- Copy your website’s Zone ID and paste it into the “Zone ID” section of the WP Rocket Cloudflare add-on section.
Step 5 – Under the “Cloudflare Settings” section within WP Rocket, flip the “Optimal settings” toggle to “ON” and leave “Development mode” and “Relative Protocol” set to “OFF.”
Step 6 – After you have all your Cloudflare add-on fields filled out in WP Rocket and the ideal WP Rocket Cloudflare settings set, hit “Save Changes.” Congratulations! You have successfully set up Cloudflare with WP Rocket.
Here’s a list of all the WP Rocket Cloudflare Add-on settings explained:
- Development Mode – Temporarily activates development mode for your website. Development Mode allows you to temporarily suspend Cloudflare’s edge caching and minification features. This gets turned off automatically after 3 hours.
- Optimal Settings – It’s highly recommended that you enable this setting. WP Rocket will automatically set your Cloudflare configuration for the best speed, performance grade, and compatibility. This option will do a number of things including:
- Set Cloudflare’s caching level to Standard
- Activate Cloudflare’s minification
- Deactivate Rocket Loader (Rocket Loader usually causes more issues than it solves)
- Set Cloudflare’s browser cache to 1 year
https://). This setting should only be activated if you use Cloudflare’s “Flexible SSL” feature. If your site runs on full SSL (which most of them should), then you do NOT want to use this feature.
- Clear All Cloudflare Cache Files – This will clear the Cloudflare cache. This should only be needed for troubleshooting or if you think Cloudflare is serving outdated files.
NOTE: If you decide to use Cloudflare APO with your website using WP Rocket, you will NOT use the Cloudflare add-on through WP Rocket. You’ll have to use the official Cloudflare plugin to handle that for you as described in “Get Started with Cloudflare APO.”
If you use the Sucuri Website Firewall (WAF) and have their caching enabled, then you’ll want to enable the Sucuri Add-On in WP Rocket.
Each time the WP Rocket cache is cleared, it will automatically clear the Sucuri cache as well.
This will keep both the WP Rocket and Sucuri caches in sync so that your site is always up-to-date with the latest content.
In order to get your Sucuri Firewall API key (for plugin), first login to Sucuri.
Next, click on your site and go to the API tab.
Copy the API key (for plugin) field, then paste your Sucuri API key into the “Firewall API key (for plugin)” box in WP Rocket.
The Sucuri Firewall API key must be in the format of: 32 characters / 32 characters.
Lastly, click “Save Changes” and your Sucuri Add-On will be successfully set up in WP Rocket.
11. Image Optimization
WP Rocket recommends that you use the Imagify plugin for image compression since it’s their own plugin.
I used Imagify with WP Rocket for many months, but it wasn’t my favorite plugin to use because it would take a long time to compress images on the fly.
You can certainly give Imagify a try if you would like, but there are two other options to try that I think are better alternatives.
- Use the ShortPixel plugin instead of Imagify. ShortPixel does image compression on the fly along with converting images to next-gen formats such as WebP. ShortPixel is even a step ahead as they are already starting to offer AVIF format which provides even better image compression with higher quality images than WebP.
- Use BunnyCDN as described in the CDN section to have BunnyCDN compress your images and serve them in next-gen formats by using their “Image Optimization” feature. No extra plugin required.
In the Tools section of WP Rocket, you have a few options of exporting your settings, importing your settings, or doing a rollback to a previous version.
Export settings – Download a backup of your settings so that you can import them on another site or give them to someone else.
Import settings – Choose a WP Rocket settings file from your computer and then click the “Upload File and Import Settings” button to have WP Rocket import all the settings for you.
Rollback – If the latest version of WP Rocket causes issues on your site (for example, your site doesn’t look right, something broke, etc.) and turning off certain settings doesn’t work for you, you can always rollback your WP Rocket to the previous version that was working in an emergency.
WP Rocket gives you a convenient Tutorials tab in their plugin with WP Rocket tutorial videos embedded directly within the plugin itself.
This allows you to view tutorials directly from WP Rocket on certain areas within the plugin so that you can be better informed on what the WP Rocket best settings are for your website in order to speed it up.
One of the biggest perks to using WP Rocket is the documentation they provide. It’s fantastic.
If you’re ever wondering what the best WP Rocket settings are for your website, you can simply click “Need Help?” on any of the sections and a popup will show up in the lower-right corner with a documentation article explaining everything you need to know.
Otherwise, feel free to check out the WP Rocket Knowledge Base which is the external version of all their documentation which is loaded with information about the ideal WP Rocket settings to choose for your website setup.
WP Rocket Alternatives
If you’re looking for alternatives to WP Rocket (either free or paid), I have a few recommendations:
I switched from using WP Rocket to FlyingPress in 2021 and I haven’t looked back. FlyingPress is even easier to configure than WP Rocket, I get even faster speeds, and FlyingPress is cheaper than WP Rocket in the long run since WP Rocket no longer offers renewal discounts.
Gijo is an extremely talented and well-respected WordPress developer who cares deeply about WordPress site speed.
FlyingPress is one of the easiest caching plugins I’ve ever set up. It’s very close to a “set it and forget it” type of plugin which is best for those who don’t want to mess with a bunch of settings that potentially break your site.
FlyingPress is a premium plugin that offers even more speed features than WP Rocket such as the ability to lazy render entire HTML elements.
FlyingPress integrates perfectly with Cloudflare APO which is one of the main reasons I moved away from WP Rocket.
SiteGround Optimizer is a fantastic free alternative to WP Rocket that can be used with any hosting ever since their v7 release.
If you’re hosted with SiteGround, then you absolutely should be using the SG Optimizer plugin. You don’t need WP Rocket on your website and SiteGround actually recommends that you only use their SG Optimizer plugin on your website due to being able to directly integrate with their servers.
Check out my SiteGround Optimizer best settings to properly configure SG Optimizer on your site and pass Core Web Vitals.
Although this plugin does work with various web servers, you should only be using this when using a LiteSpeed server for the best results.
Even if you’re hosted on LiteSpeed servers, FlyingPress may still provide better speed results than the LiteSpeed Cache plugin will. It’s a matter of trying each one and seeing which one performs better.
WP Fastest Cache
An excellent free alternative to WP Rocket is the WP Fastest Cache plugin.
WP Fastest Cache was one of the first free caching plugins I ever used when I started blogging and it does an excellent job at increasing your site speed for free.
Although they do offer a premium version of it as well, the free version still has plenty of optimizations that should help your site performance.
And that’s a wrap! I hope this very detailed tutorial on the WP Rocket best settings helps you to speed up your slow WordPress site and pass Google’s Core Web Vitals which will get you that coveted ranking boost!
Did this WP Rocket tutorial help you pass your Core Web Vital scores? Let me know down in the comments below.
Go speed up those websites,
Join the Community
Join the completely free WordPress Without Page Builders by StartBlogging101 Facebook Group and connect with an awesome community of rockstar individuals who are passionate about building fast, profitable WordPress sites to grow their businesses. Come say hi! 👋