17 Best WP Rocket Settings to Get The Fastest Loading Speed.

Share this article

Learn about the best WP Rocket settings and how to properly install and configure the WP Rocket WordPress plugin for outstanding page loading speed.

Have you ever wanted to visit a site and waited so long that you decided to hit the back button? Isn’t it frustrating to wait more than 3 seconds?

Research says that more than 50% of visitors will leave your site if it takes more than 3 seconds to load. That’s why it’s critical to have a fast loading website.

The good news is that there are plenty of ways to improve a website’s load time. And, if your website is built with WordPress, I have a great solution.

So what is the solution? -Get started with WP Rocket.

This is a premium cache plugin for WordPress sites. Unlike free cache plugins with tons of confusing options, WP Rocket is quite different and powerful.

But if you are a beginner and never heard of the term Cache, let me tell you what cache is and how it helps your website load fast.

What is Cache & How Does it Help?

The cache is a separate copy of all the pages on your website. It’s generated when a page is loaded for the first time. For all subsequent users, the cached version of your webpage is served, without going through the entire page generation process.

As a result, the pages load fast when served from the cache.

With the help of WordPress cache plugins, you can create cache easily. I personally like WP Rocket for its excellent features and performance.

This plugin helps your WordPress site load super fast. With the help of this plugin, I’ve been able to achieve outstanding results. You can read my WP Rocket review to find out how why I prefer it and how most of my pages load within just 1.5 seconds.

And, that’s a huge performance boost.

One of my most image-heavy blog posts loads in just 1.2 seconds.

gtmetrix results

A fast loading website doesn’t only help with user experience, but it helps with SEO too. Google already announced in July 2018 that it’s going to make loading time a part of their algorithm. There’s no doubt that it helps with better ranking.

With hundreds of positive customer reviews, WP Rocket is an intelligent choice for your WordPress site, if you are serious about improving the load time.

WP Rocket Review on TrustPilot

As I’m writing this article, WP Rocket has received over 700 customer reviews on Trustpilot with an excellent 4.8 rating. That proves why people obsessed with performance love this WordPress plugin so much.

How much does WP Rocket cost?

$491 website1 year of support & updates
$993 websites1 year of support & updates
$249Unlimited sites1 year of support & updates
The cost of WP rocket plugin

Without wasting any more time, let’s find out how you can download this plugin and install it on your WordPress site with the recommended settings.

Download & Install

At first, visit WP Rocket and purchase this plugin.

As already mentioned, there are three different pricing options available. The regular price is $49 for 1 site, $99 for 3 sites, and $249 for unlimited sites.

Choose the plan that suits your requirements and make your payment. Once the necessary steps are completed, you’ll receive an email with download instructions as well as your new WP Rocket account credentials.

Head over to your new WP Rocket account. You should find your special download link there, as suggested in the image below.

Download WP Rocket

Download and save the plugin’s zip file to your computer.

Next, log into your WordPress dashboard. And click Plugins > Add New.


Upload the plugin’s zip file to WordPress using the Upload button on the Plugin installation page. Hit the “Activate” button when prompted.


Congratulations! You’ve now successfully installed and activated WP Rocket.

By just activating the plugin on your site, you should see an instant performance boost. To properly check the loading performance of your site, use GTmetrix.

As you activate the plugin, WP Rocket, by default, activates page caching, browser caching, GZIP, and tons of other performance tweaks.

As a result, you should see an instant performance boost.

Let’s look at all the different options one by one and set up WP Rocket with the best configurations so that you can achieve the fastest loading speed possible.

WP Rocket Dashboard

As you install and activate the plugin, you should WP Rocket option menu in the top menu bar inside WordPress. Hover on the menu bar and click Settings.

WP Rocket settings menu bar

Or on the left sidebar menu, Click Settings>WP Rocket.

Now, you are on the plugin’s main dashboard, as show in the image below.

WP Rocket dashboard

The dashboard will provide you crucial information about your newly purchased plugin license. You also get to know how long your license stays active.

WP Rocket has its own CDN called Rocket CDN which you can opt for, right from the dashboard. By the way, I don’t recommend it. Because I know a much better CDN at a very cheaper price. The name of the CDN I use is BunnyCDN.

Why do I need CDN, you ask?

Using a CDN, you can speed up your site so much more. CDN or content delivery networks store your website’s static files (CSS, JS, images) at different geographical locations. As a result, the content can be delivered quickly when requested.

BunnyCDN Homepage

When your site loads on a browser, it loads all these static files too. So CDN delivers these files quickly resulting in faster loading speed.

Since your server is located at a specific geographical location, it’s hard to deliver content quickly if the website visitor is located by away. CDN serves the content from a server closer to the user. As a result, pages load at a faster speed.

In short, CDN helps by bringing the content closer to the website’s visitor so that they can be served quickly. When it comes to page performance, every second is important. That’s why it’s a smart choice to use a CDN.

But RocketCDN from WP Rocket costs so much more than BunnyCDN that I use. It provides the same level of quality at a much cheaper cost.

Let’s get back to setting up WP Rocket with the best settings.

From the dashboard, you can remove all the cache files already created by WP Rocket, start cache preloading and regenerate critical CSS.

You can do it from the quick actions menu on the right.

WP Rocket quick actions

You also get a few getting started guide and the answers to the most frequently asked questions. On the left menu, click “Cache” to configure it now.

WP Rocket Cache Settings

As you click on “Cache”, you are on the “Cache” configuration page that will let you set up mobile cache, user cache, and cache lifespan.

Mobile Cache

WP Rocket Mobile Cache

First, you’ll find Enable Caching for Mobile Devices. Check this box to enable mobile caching for your website.

This option enables your mobile visitors to receive cache files, resulting in faster loading speed for mobile users.

Nowadays, most modern WordPress themes are mobile responsive. So you don’t need separate cache files for mobile devices. But if you are using any mobile-specific theme, enable the option “Separate Cache Files for Mobile Devices“.

User Cache

WP Rocket User Cache

User Cache is excellent when you have user-specific or restricted content on your website. Imagine that you’ve given access to a few more users who can log into your website and perform different tasks.

Usually, you want them to receive a version of your page, specific to that user, not the cached version specific to you. If you enable this option, all other users will receive their own user-specific cached version even if they are logged in.

Just leave it unchecked, if you are the only user.

Cache Lifespan

Cache Lifespan

This is where you can specify the time after which you want the cache to be deleted and refreshed. A new version of the cache will be generated if Preloading is activated. (I’ll discuss later). Ask yourself the following question:

How frequently does your website get updated?

The answer will help you figure out the correct time to clear the global cache. If your site is updated more frequently use a smaller number.

Or just leave it as it is. It won’t make a difference in most cases.

WP Rocket File Optimization Settings

The file optimization section will help you modify the settings related to optimizing your HTML, Google fonts, minify CSS files, and a lot more.

First, you’ll find the basic settings.

Basic Settings

Basic settings that can be found under File optimization tab within WP Rocket WordPress plugin.

Enable both of the functions. Minify HTML minifies HTML by removing whitespace and comments to reduce the file size.

Optimize Google Fonts will improve font performance.

It combines multiple font requests and reduces the number of HTTP results, resulting in faster loading speed.

CSS Files

WP Rocket css file optimization

In this CSS section, you should enable all the following functions:

  • Minify CSS files
  • Combine CSS files
  • Optimize CSS delivery

All these functions are pretty self-explanatory. Minify CSS Files will reduce the file size by removing whitespace and comments.

Once enabled, Combine CSS Files merges all files into 1 file. It reduces HTTP requests. However, this is not recommended if your site uses HTTP/2.

Please note that combining CSS files is a great way to reduce HTTP requests. But it may sometimes break your site. So if you find any errors on your website after having it activated, just deactivate it. Your site will get back to normal.

If your site design is breaking or it’s having an issue with a specific CSS file when optimized, you can exclude the file with Excluded CSS Files section.

Tick the checkbox Optimize CSS Delivery to eliminate render-blocking resources. It generates critical path CSS for your website in the background. As a result, CSS will be loaded asynchronously without render-blocking.

JavaScript Files

WP Rocket Javascript Settings

Remove jQuery Migrate prevents a specific jQuery migrate file from loading on your WordPress site. This is unnecessary in most cases.

jQuery File Location: wp-includes/js/jquery/jquery-migrate.min.js

This particular jQuery file is automatically loaded with every page load, even if it’s NOT required, in most cases. It only adds 1 extra HTTP request.

By enabling this option, you make sure that this file doesn’t load.

However, there are still some WordPress themes that use this old jQuery versions. To be sure it doesn’t break your site, check if you see any errors after activation.

If your theme is using this file, enabling this setting may cause issues. In most cases, modern WordPress themes don’t use this file. If your theme does, just deactivate it and your website will get back to normal.

Just as the CSS minification, Minify Javascript Files setting will minify Javascript files by removing whitespace and comments from your Javascript files.

Please understand that activating these settings may sometimes break your site. So I will suggest you enable each setting one by one and check if it’s causing issues with your site. In most cases, it won’t create problems. But if it does, just deactivate the setting. And things will get back to normal.

As a name suggests, Combine Javascript Files will combine all javascript files (internal, 3rd party, and inline JS) and reduce HTTP requests.

In the white boxes, you can specify any JS URLs that you want to be excluded.

Sometimes, a specific file only causes issues with your site. In this case, you can just exclude that particular file instead of deactivating Javascript optimization.

Enable Load Javascript Deferred to load all of your JS files and the ones minified by WP Rocket at the footer of your site.

Activating this setting may break your site if your site is using jQuery. In that case, tick the box that says Safe Mode for jQuery. It will exclude the jQuery file from being loaded at the footer. It’s safe to enable the function to stay safe, in case you have no idea if your website is using jQuery or not.

WP Rocket Media Settings

In the Media section, you can cofigure all your media related settings.

First, you’ll get the setting for LazyLoad.


WP Rocket LazyLoad settings

Lazy loading is an optimization technique that loads content only for the visible portion of the web page, instead of loading the entire webpage at one go.

Offscreen images are not really necessary. It’s required only when the user scrolls down the page and actually needs to see them. By enabling LazyLoad for Images, you prevent offscreen images from loading, resulting in much faster load time.

You should also Enable LazyLoad for Iframes and Videos and Replace YouTube iframe with preview images.

If you have a lot of YouTube videos embedded on your pages, this will significantly improve the load time as your pages won’t be loading YouTube iframes anymore, but replace them with a preview image.


Disable Emojis in WP Rocket

You should disable emojis on your site. As a result, your site will use the default emojis of the visitors’ browser instead of pulling it from WordPress.org.

If you love emojis, that’s fine. If you are obsessed with page performance, it’s a smart choice to disable emojis on your site. Emojis require an extra script (wp-emoji Script) and CSS to be loaded which can unnecessarily slow your site.


WP Rocket Embeds

Disable WordPress Embeds will prevent others from embedding content from your site, prevent you from embedding content from other (non-whitelisted) sites, and removes JavaScript requests related to WordPress embeds.

Just tick the checkbox and the rest will be taken care of.

WebP Compatibility

WP Rocket webp compatibility

WebP is a modern image format developed by Google.

WebP images files are smaller than other image file formats. But it still provides the same level of image quality.

This image format was developed to address the page loading issues. A webpage with lots of images often loads slowly. A small file format can help significantly.

WP Rocket doesn’t create WebP images. It doesn’t convert your existing image formats. There are many WordPress plugins that can do it. WP Rocket has its own image optimization plugin called Imagify (that I use) can convert your images.

If you use Imagify and enable it to use WebP file format, WP Rocket will automatically detect it on your site and serve WebP for your images.

WP Rocket Preload Settings

Click on the Preload tab to get to the Preload settings page. In this section, you can generate cache files for all your page even before they are required by a user.

First, you’ll find the Preload cache setting.

Preload Cache

Preload Cache

It’s highly recommended that you enable Preload Cache for your site. It generates the cache of all your pages beforehand so that when a page is requested by users, it can be served immediately from the cache.

It’s automatically triggered when you publish a new blog post, add new content, or update old content. You can manually trigger it if required.

Create an XML sitemap file by using a sitemap generator and upload it to your website’s root folder. Specify the file path in the white box. Now, WP Rocket can use this file to efficiently preload the entire cache.

Prefetch DNS Requests

Prefetch DNS Requests

If you use third party content like Google fonts or YouTube videos on your website, it’s a good idea to add the origin domains to the Prefetch DNS Requests box.

This way, the browser knows the domains may be required and performs the DNS lookups for links in the background. So when a user clicks on a link, they don’t have to wait for the DNS lookup to take place, as it already has.

This will significantly improve the user experience on your site.

For your convenience, I’ve added the most common DNS requests below:

  • //maps.googleapis.com
  • //maps.gstatic.com
  • //fonts.googleapis.com
  • //fonts.gstatic.com
  • //ajax.googleapis.com
  • //apis.google.com
  • //google-analytics.com
  • //www.google-analytics.com
  • //ssl.google-analytics.com
  • //youtube.com
  • //api.pinterest.com
  • //cdnjs.cloudflare.com
  • //pixel.wp.com
  • //connect.facebook.net
  • //platform.twitter.com
  • //syndication.twitter.com
  • //platform.instagram.com
  • //disqus.com
  • //sitename.disqus.com
  • //s7.addthis.com
  • //platform.linkedin.com
  • //w.sharethis.com
  • //s0.wp.com
  • //s1.wp.com
  • //s2.wp.com
  • //s.gravatar.com
  • //0.gravatar.com
  • //2.gravatar.com
  • //1.gravatar.com
  • //stats.wp.com

Remember that you only need to DNS prefetch the external URL requests being made on your website. You can use any page load time testing website to figure out what external URLs are required for your site.

Preload Fonts

Preload Fonts

Just as Cache preloading, you can preload your fonts if the fonts are hosted on your website. It will signicantly improve the loading time of your site.

Make sure you specify the URLs of the font files to be preloaded.

WP Rocket Advanced Rules

This section will help you fine-tune the cache rules for your site. In most cases, you don’t need to touch the advanced rules.

If you are a beginner, you can just leave this section as it is. It won’t make any difference. This section doesn’t influence how fast or slow your site loads.

First, you’ll find Never Cache URL(s).

Never Cache URL(s).

Never cache URLs

If you know there are specific pages on your site that should never be cached, specify the URLs in the appropriate box.

Pages like custom login/logout URLs, cart, check out, and account page should not be cached. Visitors should always get a fresh version of the webpage.

Make sure you specify these URLs in the white box.

In case you use the Woocommerce plugin, WP Rocket will automatically detect the required pages to be excluded from the cache.

So you don’t need to do anything.

Never Cache Cookies

WP Rocket Never Cache Cookies

As the name suggests, Never Cache Cookies enables you to specify the IDs of cookies that, when set in the visitor’s browser, should prevent a page from getting cached. Make sure you specify the IDs one per line.

Never Cache User Agent(s)

Never Cache User Agents

In the same way as Never Cache Cookies, you can specify user agent strings that should never see cached pages in the Never Cache User Agent(s) section.

Always Purge URL(s)

Always purge URLs

As the name suggests, here you can specify URLs you always want to be purged from the cache whenever you update any post or page.

Cache Query String(s)

Cache Query Strings

If your site has URLs with a question mark (?) followed by a parameter and a value, it’s called Query strings. By default, WP Rocket doesn’t create a cache for URLs with query strings. But if you want these pages to cached too, make sure that you specify each parameter in the text field (one per line).

WP Rocket Database Settings

Database optimization is super important.

A huge database with lots of unnecessary data prevents the database to perform efficiently. Because it takes a long time for your server to retrieve information from your database tables. By removing unwanted data from your database, you reduce the size of your database and also improve its performance.

Post Cleanup

Post Cleanup

Under Post Cleanup, check all the boxes. This will remove the post revisions, auto drafts, and trashed posts from your database. You also can specify how often you want WP Rocket to perform this job under the Automatic Cleanup section.

Comments Cleanup, Transients Cleanup & Database Cleanup

Database Optimization

Check all the boxes under Comments Cleanup, Transients Cleanup as well as Database Cleanup. Selecting all these boxes will remove spam comments, trashed comments, and transients from your database.

By enabling Optimize Tables setting, your database will be optimized at regular intervals based on the time you select under the Automatic Cleanup section.

Automatic Cleanup

Automatic Cleanup

I prefer daily optimization. But if you don’t update your site frequently, there’s no need for daily optimization. You can choose daily, weekly or monthly frequency based on how often you update your website.

WP Rocket CDN Settings

I’ve already talked about what CDN is and how it helps speed up your website loading time. In short, the purpose of using a CDN is to minimize the distance between the visitors and your website’s server so that your’s website’s static files like images, CSS, and Javascript can be served quickly to the visitor.

Under the CDN tab, you can specify the CNAME(s) of your selected CDN.


WP Rocket CDN Settings

Leave it as it is if you don’t use any CDN for your website.

I personally like to use BunnyCDN. They have a free trial of 14 days. The minimum cost is only $1 per month. Yes, only $12 will set you up for a year.

Visit BunnyCDN now and sign up for a trial.

Exclude Files from CDN

Exclude Files from CDN

In the text field under Exclude Files from CDN, you can specify URLs of the files that should not be served via CDN.

As an example, I use the Onesignal web push notification service that doesn’t work properly if the required files are served by a CDN. For it to work efficiently, the files must be served from the primary domain.

So the files need to be excluded. I just specified the file URL to be excluded and everything is now working fine. Don’t forget to save all your changes.

WP Rocket Heartbeat Settings

Since WordPress version 3.6, WordPress introduced a new feature called Heartbeat. It provides a communication protocol between the browser and your server.

The heartbeat API helps you to sync all the data between the server and the WordPress dashboard. Without it activated, all the changes you make to your site, blog posts, or other content will be lost if you don’t save it manually.

But continuous triggers may not be required, in most cases. It resource-intensive and can indirectly influence your website performance.

WP Rocket Heartbeat section helps you reduce this activity.


WP Rocket Heartbeat

With the help of Heartbeat inside WP Rocket settings, you can easily control the frequency. It’s a smart choice to reduce the activity without completely disabling it.

There are many WordPress plugins and themes that use Heartbeat API. So deactivating it completely may cause issues on your site. Do it at your own risk.

WP Rocket Add-ons

Under the Add-ons tab, you find some extra functionalities that you can activate by just switching the option “on” to enable from this screen.

Improve browser caching for Google Analytics

Google Tracking Add on

Switch the option “on”.

Most sites use Google Analytics and you should too.

But the problem is Google Analytics tracking codes are hosted on Google servers. Because of their short expiration time, you’ll get browser caching warning in many website performance testing tools.

Unfortunately, you cannot set an expiration time for files you don’t host. So there is only 1 solution. You have to host the files.

By enabling this setting, WP Rocket will host these Google scripts locally on your server. As a result, you’ll not get the warning anymore.

Improve browser caching for Facebook Pixel

Facebook PIxel Add on

Switch the option “on” only if you use Facebook pixel on your site.

Once enabled, WP Rocket will host Facebook Pixels locally on your server just as it does for Google Analytics scripts.

As a result, you won’t get browser caching related warnings.


Varnish Cache

Many web hosting companies (WP Engine, Flywheel or Cloudways) use varnish cache. If you are not sure whether your web hosting use it, just ask them.

Switch the option “on” only if you use varnish cache.

Once activated, varnish cache will be purged whenever WP Rocket clears its cache so that the content always stays up-to-date.


CloudFlare Add on

Cloudflare Add-on can be activated if you want to use their free CDN service.

This is a highly popular web-infrastructure and website-security company that also provides CDN services. It’s completely free to use.

However, I don’t think their free CDN works as efficiently as other premium options. I strongly suggest you go for BunnyCDN, instead of using Cloudflare.

BunnyCDN only requires a minimum of $1 per month while Cloudflare premium plans will cost you as high as $20 per month.

Paying such a high price for CDN doesn’t make sense if you run a small site that receives only a few thousand visitors per month.

But if you still want to go with Cloudflare, follow the instructions:

At first, visit Cloudflare and sign up for a free account. Follow all the necessary steps to successfully add your website to Cloudflare.

Once Cloudflare starts working for your site, get back to your WP Rocket dashboard.

Now, switch on the Cloudflare add-on. You’ll be asked to provide the global API key and Zone ID that you can find inside your Cloudflare account.

Cloudflare Credentials

Provide the appropriate credentials in the required field.

Under Cloudflare Settings, choose Optimal Settings. It will automatically enhance your Cloudflare configuration for speed, performance grade, and compatibility.

Cloudflare Settings

From here, you can also purge all Cloudflare cache files.

Congratulations! you’ve now successfully added Cloudflare with WP Rocket.


Sucuri in WP Rocket

Switch the option “on” only if you use Sucuri Website Firewall with their caching enabled for your site. Turning on this add-on will enable WP Rocket to clear Sucuri cache whenever WP Rocket’s cache is deleted.

Once enabled, it will ask for your Sucuri credentials (firewall API key).

Sucuri Credentials

You can also manually clear all Sucuri Cache files by hitting the clear button.

Now, provide the appropriate credentials and save your changes.

WP Rocket Tools

The tools section will help you download a backup file for your settings, import settings from a file in your computer, and roll back to any previous version in case the present version is causing issues with your site.

For your convenience, I am sharing my WP Rocket settings file that you can download by clicking on this link.

So just visit the WP Rocket site and get an account. Download the plugin and activate it on your site. Import my WP Rocket setting file from the Tools tab.

Save your changes and enjoy an improved performance on your site.

My Final Words

Let me know if I’ve missed anything.

Did this article help you achieve the desired load time you want for your site? Please share it to help others who may need this information and give meaning to the efforts I’ve put into creating this awesome piece of content.

Free 5-Day’s Course Reveals 5 Easy Steps to Speed Up Your WordPress Site

The course consists of five practical lessons, delivered to you by mail. We’ll cover the essentials of site speed and give tips you can implement right away. You can unsubscribe at any time. Join 1700+ WordPress speed lovers now.

Share this article

Launch a Blogging Business

Get instant access to a beginner-friendly comprehensive blogging guide with EVERYTHING you need to know to successfully LAUNCH a blogging business that almost guarantees $1,000+ per month income.

100% Privacy. No Spam Ever.

Free 14-Day's Blogging Course

A step-by-step FREE email course for starting, building, and growing a blog-based online business from scratch, starting right from the beginning. (SIGN UP NOW TO UNLOCK THE 1ST LESSON)

Start a Blog

100% Privacy. No Spam Ever.

Free 5-Day's Course to Speed Up

Your WordPress Site

The course consists of five practical lessons, delivered to you by mail. We’ll cover the essentials of site speed and give tips you can implement right away. You can unsubscribe at any time.