Inhoudsopgave

What is WP Rocket?

WP Rocket is a WordPress plugin that helps you reduce your website’s load time through caching and other technical SEO optimizations.

Caching and WP Rocket

Caching involves retrieving data from your pages and storing it on the visitor’s device. When a website visitor views multiple pages, files such as style sheets do not need to be downloaded again; instead, they are retrieved from the cache. This ensures that the page loads faster.

How much does WP Rocket cost?

WP Rocket is a paid plugin and does not offer a free version. When you use WP Rocket, you can choose from three plans:

  1. The Single package for €44 per year
  2. The Plus package for €88 per year
  3. The Infinite package for €222 per year

WP Rocket Pricing

 

With WP Rocket, you pay for the plugin on an annual basis. Pricing depends on the number of websites you use WP Rocket on. Are you a blogger who only wants to optimize your own website with the WP Rocket plugin? Then the Single plan is right for you. Are you the owner of a marketing agency or a web development agency? Then we recommend the Infinite plan, which allows you to use the plugin on an unlimited number of websites.

View and download WP Rocket

If you decide within the first 14 days that you don't like WP Rocket, you'll get your money back and your subscription will be canceled. Check out the WP Rocket plugin and pricing by clicking the button below.

Check out WP Rocket

Install WP Rocket

Once you’ve chosen the right plan, we can move on to the next step: installing WP Rocket in your WordPress environment. You should have received an email from WP Rocket with a link. Follow these steps to install WP Rocket:

  • Download the ZIP file from the email you received or from the WP Rocket dashboard.
  • From the dashboard of your WordPress website, go to Plugins.
  • Under "Select File," choose the ZIP file for the WP Rocket plugin.
  • Install it, and it will be available in your WordPress environment.
  • Activate the plugin via "Plugins" in the left-hand menu.

Getting Started with WP Rocket

Now that WP Rocket is installed and activated, the real work can begin: we’re going to get started with WP Rocket. Without you even noticing, WP Rocket gets to work for you right away. As soon as you activate the plugin, WP Rocket has already implemented a number of optimizations, such as setting up caching.

If all goes well, you should already see a significant difference in your website’s loading time. You can easily check this using PageSpeed Insights, Lighthouse, or GTmetrix. Tip: Test the speed before and after activating the plugin.

To tell you all about WP Rocket, in this WP Rocket guide we’ll walk you through seven key features that you’ll see in the left-hand menu in the image below.

Setting Up WP Rocket

1. WP Rocket Cache Settings

The first item in the menu is “Cache.” Here you’ll find WP Rocket’s cache settings. In the image below, you can see the various options for configuring caching.

WP Rocket Cache Settings

Mobile Cache Settings

Mobile searches are on the rise, and Google considers mobile-friendliness to be important. For these reasons, we strongly recommend enabling caching for mobile devices. Once you’ve selected this option, you’ll have the option to separate cache files for mobile devices. As WP Rocket itself points out, mobile caching works most reliably when both options are selected.

User Cache

Under “User Cache,” you can enable caching for logged-in WordPress users. Do you have a website where visitors create accounts and log in regularly? If so, we recommend selecting this option. If you enable this feature, WP Rocket creates a separate set of cache data for each logged-in user.

Cache Lifetime

WP Rocket sets the cache lifetime to 10 hours by default. Do you have a website where not much changes? In that case, a cache time of “0” or more than 10 hours is fine. Do you have a website that undergoes regular changes, such as uploading new blog posts or updating news articles? In that case, we recommend setting the cache time to a shorter duration. This prevents visitors from seeing outdated information because the cache hasn’t been cleared yet.

Summary

In summary, select the following settings:

  • Enable Caching for Mobile Devices
  • Separate Cache Files for Mobile Devices

2. File Optimization

In the file optimization section, you can reduce the size of HTML, CSS, and JavaScript files. By removing unnecessary code—such as blank lines—from these files and loading them differently, you can reduce a page’s load time. First, let’s take a closer look at the basic settings shown in the image below.

WP Rocket File Optimization Basic Settings

HTML Optimizations

HTML stands for Hyper Text Markup Language and is the source code of a web page. When you minify HTML, WP Rocket removes whitespace and comments from the code. This reduces the file size, which has a (slight) positive impact on load time. This also makes the code a lot cleaner.

Next, you can choose to combine Google Fonts files, which reduces the number of HTTP requests. An HTTP request is a request sent to a web server to retrieve information about a web page. Such requests take time, so it’s best to send as few requests as possible.

Finally, you can remove query strings from static files. This often causes problems and has no effect on your page load speed. For this reason, we do not recommend selecting this option.

Summary

In summary, select the following settings:

  • Minify HTML
  • Combining Google Fonts Files

Optimizing CSS and JavaScript

The most important settings in this section are those for optimizing CSS and JavaScript files, as these have the greatest impact on your page load speed. Along with caching, this is where most websites can see the greatest improvement. The optimization options are as follows:

Optimizing CSS and JavaScript in WP Rocket

CSS files

A CSS file is a Cascading Style Sheet. Simply put, it’s a small file containing programming code that ensures HTML files are formatted properly. Developers include information in these files to ensure a website looks polished. To make this code easier to read, developers add whitespace and comments to these CSS files. Visitors (fortunately) don’t see this, but this extra whitespace and these comments do affect your website’s load time.

When you minify CSS files with WP Rocket, whitespace and comments are removed. But be aware: in some cases, this can cause issues on the front end of your website. If you notice this, you can simply disable the option again to undo the changes.

We recommend leaving the “Combine CSS Files” option disabled. Most websites run on the HTTP/2 protocol. If your website does not run on HTTP/2 but on HTTP/1.1, we recommend that you enable this feature. You can easily check whether your website runs on HTTP/2 using KeyCDN’s HTTP/2 test.

Finally, it is recommended that you enable the “Optimize CSS Delivery” feature. This will make your page render faster, which improves the Largest Contentful Paint (part of the Core Web Vitals).

JavaScript files

JavaScript files are text files containing programming code. Just like with CSS files, developers add whitespace and comments to these files to make them easier to read. Do you want to minify these JavaScript files? You can easily do this in WP Rocket using the “Minify JavaScript Files” option. Keep in mind that this can also cause issues on the front end of your website. If you notice anything unusual, you can easily disable this option again.

The same applies to JavaScript files: it’s usually best to leave the “Combine JavaScript files” option turned off, unless your website isn’t running on HTTP/2. We do recommend enabling the “Defer JavaScript loading” option, as this also has a positive impact on your page’s load time.

A newer feature in WP Rocket is the “Delay JavaScript Execution” feature. We’re big fans of this feature because it improves load times for most websites. We therefore recommend using it. By default, a lot of scripts are already added here, so in most cases, you won’t need to add any yourself.

Summary

In summary, select the following settings:

  • Reduce the size of CSS files
  • Optimizing CSS Delivery
  • Minify JavaScript Files
  • Deferred JavaScript Loading
  • Delay JavaScript Execution

3. Optimizing Media with WP Rocket

Another great feature of WP Rocket is improved loading of all media files. We’ll take a closer look at LazyLoad, the use of emojis, embeds, and WebP compatibility. The image below shows the options for optimizing your media files.

Optimizing Media with WP Rocket

LazyLoad

LazyLoad loads only the images and videos that are visible to visitors. An image is loaded only when the visitor scrolls down and it is about to come into view. So, if you have a total of 3 MB of images on your web page but, at first glance, only 1 MB is “in view” for the visitor, then only 1 MB needs to be loaded initially. The remaining images will load later, once they also come “into view” for the visitor. This saves a lot of download time when visitors view your pages.

Emoji

If you disable emojis, they won’t be removed from WordPress.org, but rather from the visitor’s browser. We recommend selecting this option to reduce load time. The Emoji feature is no longer available in newer versions of WP Rocket; it has been replaced by the Image Dimensions feature.

Image Dimensions

The “Image Dimensions” feature has been added to the latest versions of WP Rocket. This feature sets fixed widths and heights for images, reducing flickering during loading. We recommend enabling this feature, as it improves the user experience.

Embeds

In addition to disabling LazyLoad and emojis, you might want to consider disabling WordPress Embeds. Embedding content allows you to easily integrate external content into your website. However, it also creates new HTTP requests and requires JavaScript, which results in longer load times. By disabling WordPress Embeds, you prevent new HTTP requests and avoid unnecessary load times caused by the need for additional JavaScript.

WebP compatibility

WP Rocket works with Imagify to convert your website’s images to the superior WebP format. There are several plugins that do this within WordPress. If you’re not using Imagify but another plugin to load WebP images, we recommend enabling this feature. If you’re using Imagify or don’t use any other plugin for WebP images, you don’t need to use this option.

Summary

In summary, select the following settings:

  • To enable images
  • To enable iframes and videos
  • Replace YouTube iframe with a sample image
  • Turn off emojis (if available)
  • Add missing image dimensions (if available)
  • Disable WordPress Embeds

4. Preloading with WP Rocket

By preloading pages, they are downloaded in the background, so your visitors don’t have to wait as long. In WP Rocket, you can easily select which URLs you’d like to preload. The image below shows what this feature looks like.

WP Rocket Preloading

Preloading

Once you’ve downloaded WP Rocket, “Enable preloading” is selected by default. This immediately and significantly reduces your website’s load time. Do you want to preload all URLs from a specific sitemap? If so, check the option: “Enable sitemap-based cache preloading.” Plugins such as Yoast SEO or Rank Math SEO automatically generate sitemaps. Select the appropriate one or manually enter an XML sitemap.

Preload Links

The “Preload Links” feature is a newer feature in WP Rocket. The moment a visitor hovers over an internal link with their mouse, that page is downloaded in the background. If the visitor then clicks on the internal link, the page loads much faster because the visitor isn’t downloading it for the first time then.

Preload DNS Requests

Next, you’ll see the option to preload DNS requests. Enabling this option in WP Rocket will make external files load faster on your website. Manually specify which external hosts should be prefetched. Some common external hosts for prefetching are:

  • //ajax.googleapis.com
  • //cdnjs.cloudflare.com
  • //code.jquery.com
  • //connect.facebook.net
  • //fonts.googleapis.com
  • //fonts.gstatic.com
  • //google-analytics.com
  • //googleads.g.doubleclick.net
  • //maps.googleapis.com
  • //maps.gstatic.com
  • //maxcdn.bootstrapcdn.com
  • //platform.twitter.com
  • //ssl.google-analytics.com
  • //use.fontawesome.com
  • //www.google-analytics.com
  • //www.googletagmanager.com
  • //www.googletagservices.com
  • //youtube.com

It’s important to carefully review all the DNS requests your website makes. Adding unnecessary requests will have a negative impact on load time. You can use tools like GTmetrix to see which DNS requests your website makes. Enter your website URL into GTmetrix and then go to the Waterfall tab. In this tab, you’ll see an overview similar to the image below:

Waterfall GTmetrix

In the “Domain” column, you’ll see all the domains for which a DNS request is made. Copy these domains—excluding your own domain—and list them one below the other in the WP Rocket list, placing a double slash before each domain. An example is //youtube.com.

Preload Fonts

To make the fonts used on your website load faster, use the “Preload Fonts” option. In the same Waterfall you use for DNS requests, you’ll see your website’s fonts listed. Fonts are the files that end with a .woff, .woff2, .ttf, or .otf extension. Copy these fonts and add them. Preloading our fonts looks like this:

Preload Fonts with WP Rocket

Summary

In summary, select the following settings:

  • Enable preloading
  • Enable sitemap-based cache preloading
  • Yoast SEO XML sitemap (if available) or Rank Math XML sitemap (if available)
  • Preload Links (if available)
  • Preload DNS Requests
  • Preload Fonts (if available)

5. Advanced Rules

Sometimes an exception needs to be made to the “normal” caching process. Although the average WordPress user will rarely use this option, it can be just what advanced users are looking for. You can easily specify these exceptions in the WP Rocket plugin: for each exception, you manually enter the URLs. Not sure whether this applies to your website? Check with your SEO agency or web developer. Exceptions to the “normal” caching process include:

  1. login/logout pages that should not be cached;
  2. cookies that should not be cached;
  3. user agent strings that should not be cached, such as Internet Explorer or Google Chrome;
  4. other URLs that should not be cached, such as the shopping cart area or checkout pages, or
  5. query strings that *should* be cached. WP Rocket does not automatically cache query strings.

6. Clean Up the Database with WP Rocket

The sixth section of this WP Rocket guide is about cleaning up your website’s database. After a few years, there’s a good chance your website has accumulated quite a bit of “clutter” that’s of no use to you—or even hinders your website’s functionality. You can clear out this “clutter” in just a few clicks with WP Rocket. But be careful: make a backup of your database first, because these changes cannot be undone.

Cleaning Up the Database with WP Rocket

With this feature from WP Rocket, you can easily clean up your website. The elements you can clean up include:

  • Revisions
  • Automatic Drafts
  • Deleted messages
  • Spam comments
  • Deleted comments
  • Transients that have expired
  • All transients
  • Optimizing Tables

Finally, you can select the option to automatically clean up your website. But since you won’t be able to undo the changes you’ve made, this can be tricky. That’s why we can’t stress this enough: be sure to make a backup before taking this action.

7. CDN via WP Rocket

CDN stands for Content Delivery Network. In short, it’s a system that helps you speed up the global delivery of your website. A CDN works well in combination with WP Rocket’s caching features. With this feature, WP Rocket rewrites all URLs for images and CSS and/or JavaScript files to point to the CDN you’re using. As a result, the web browser retrieves this data from your CDN’s cache rather than from your own server. This reduces the load on your website, resulting in faster load times. A CDN is particularly recommended if your website receives international traffic. If you focus solely on one country and your website is hosted there as well, then a CDN is usually not necessary.

The image below shows how to enable this feature: once you’ve checked the “Enable Content Delivery Network” option, manually add the CNAME. You received the CNAME from your CDN provider. At the bottom, manually exclude URLs or files that, for example, cannot be served through your CDN.

Enable CDN in WP Rocket

Tip: Do you use a CDN like Cloudflare or Sucuri? WP Rocket has developed special Rocket add-ons for this purpose. You can find them under Add-ons.

WP Rocket as a Successful Caching Plugin

You don’t need to be an experienced developer to use this plugin—there’s no complicated code to enter anywhere. Still have questions? Check out WP Rocket’s tutorials or easily contact the WP Rocket team. With its many features, WP Rocket is an attractive plugin for improving your WordPress website. If you ask us, it’s well worth the price. What if you purchase a WP Rocket license and it doesn’t meet your expectations? You can easily get your money back. So there’s absolutely no risk involved.

Jarik Oosting

This article is written by Jarik Oosting

With a passion for SEO and an unmatched drive for results, Jarik Oosting is the driving force behind SmartRanking. With over 15 years of experience in the field, he has built an extensive body of knowledge spanning technical SEO to complex site migrations. As the founder of SmartRanking, he has assembled a team of like-minded SEO specialists who help businesses achieve sustainable online growth.

His academic background in information science at the University of Groningen, with a specialization in natural language processing, gives him a unique perspective on the world of SEO. For Jarik, it’s not just about visibility in search engines, it’s about sharing knowledge and guiding businesses toward sustainable online success. That mission also led him to write a Dutch book about GEO.

More about SmartRanking