Amsive

PUBLISHED: Mar 1, 2021 8 min read

Your Guide to Configuring WP Rocket for WordPress

 https://wp-rocket.me
 Version:  This guide was written for WP Rocket version 3.9.1. 

With the advent of Google’s Core Web Vitals set to change the 2021 SEO landscape, it is more important than ever to ensure your website is optimized to deliver visitors a seamless and speedy browsing experience. WP Rocket is a great tool to help do just that, with both easy-to-use and advanced features for optimizing your site.

Consider the below guide a first step in navigating the many features WP Rocket provides to enable you to achieve the best site performance possible.


Installation and Page Caching

The most important thing you can do for your site is to ensure you have proper caching in place to allow your static pages to load as fast as possible. Simply installing WP Rocket and turning it on will enable a default set of features, most important of which is static page caching.

Note: Some web hosts have built in caching like WP Engine, but WP Rocket is one of the only caching plugins for WordPress that is fully compatible with their caching solutions, so it is still a great tool for that.

The cache tab mostly configures itself when you first install the plugin, but you might want to tweak it depending on your desired configuration. Here are a few popular ways to do that.

Mobile Cache – This should be enabled by default, if not make sure you turn it. It will ensure caching is enabled for mobile devices

Separate cache files for mobile devices – Leave this unchecked unless your site contains a separate theme for mobile devices, which is rare.

User Cache – This option enables caching for users that are logged into your website. We generally recommend leaving this off unless you have a user-heavy site, such as a site that features WooCommerce, in which case you may turn it on after thorough testing. Most marketing websites can completely disregard this feature as they do not have users.

Cache Lifespan – The default time of 10 hours is sufficient in most circumstances and we don’t recommend changing it unless you notice issues.


File Optimization

This section discusses several features which can dramatically improve your score. However, not all optimizations are created equal. We it ranked each on a scale of low, medium and high risk, depending on how likely each option is to cause issues with a website theme. A well-built theme should be compatible with all features, but it is always best to test first.

Low Risk

  • Minify CSS – In almost all cases, this will be safe to enable and doing so would result in a minor bump to your page speed due to the compression and smaller file sizes.
  • Minify JS – As with the above in almost all cases, this will be safe to enable and doing so would result in a minor bump to your page speed due to the compression and smaller file sizes.

Medium Risk

  • Combine CSS/JS – It is generally a good idea to not enable this option, especially if your site supports http2. However, we have seen some cases where turning this on can increase site speed in less well-optimized sites. The best recommendation would be to test turning it on and off to see what sort of impact it has on your score.
  • Optimize CSS Delivery – This is a great option to turn on if you can, as it will offer a modest improvement in your page speed’s initial draw. Turning this on can be risky depending on how the site is built so it should be tested well. We have seen it cause visual issues, but you can enter some fallback critical CSS and/or disable it on a page-by-page basis. This option takes a while to activate as it enables a bot that crawls your website’s various page templates to generate the CSS.

High Risk

  • Remove Unused CSS (Beta) – A relatively new option to WP Rocket, this feature will attempt to strip out unused CSS for a page. However, it is fairly prone to error so use with caution.
  • Load JavaScript deferred – This option is amazing to turn on as it provides a significant performance increase to site load times. However, tread cautiously, as it can break websites with scripts that are not expecting its activation. We also recommend you live the sub option “Safe Mode for jQuery” checked as there are many plugins/inline scripts expecting jQuery to be loaded in the header that will break if it is not found.
  • Delay JavaScript execution – This option can be the single biggest tool for improving page speed score. However, enabling it can be high risk because using its default configuration will cause most analytics and advertising pixels including GTM/Google Analytics to not fire until a user has interacted with the page. This may cause tracking issues on a poorly optimized site, which means thorough testing to be part of your process. If you can make your site compatible with this options, you’ll benefit from it greatly.

Media

This section contains various options for optimizing the way media works for WordPress. We’ll go through each feature to outline its risk and potential performance benefit.

Lazy Load Images – This is another one with significant site speed benefits but some risk: Lazy Loading images may cause issues with various page templates and/or carousels. It is recommended that you test thoroughly. In addition, WP Rocket has an ability to skip lazy loading for certain images.

Important: It is recommended that you skip all images that are loaded in the initial view port for optimal performance. You can find directions for skipping images here.

iframesTurning this on can also greatly benefit a site’s page speed but can cause things like iframed YouTube videos to experience visual issues. Be sure to test to make sure it’s compatible, and as with images you can optionally skip certain items by following the instructions here.

Add missing image dimensions – It’s highly recommended to check this feature, especially if your site is using a theme that doesn’t properly populate image dimensions. This will help with improving your CLS (Cumulative Layout Shift) score. More info on this feature can be found here.

Disable Emoji – This is turned on by default as most sites do not need WordPress native emojis. If your site also does not need them, then leave this on. This will result in a minor performance increase since you are loading fewer assets.

Disable WordPress embeds – We recommend not enabling this as there is minimal performance impact for turning it on. However, if you do turn it on, it can help prevent other sites from embedding your content which may reduce server load.

Enable WebP Caching – We recommend leaving this disabled unless you are using the Imagify plugin for optimizing your website images. We do recommend you find a solution for allowing WebP images on your site via a CDN or optimization plugin.


Preload Cache

This section contains information on optimizing WP Rocket’s ability to preload pages to help ensure they are cached when server to end users.

Activate Preloading – This is enabled by default and recommended to ensure your site preloads its cache. Note: Turning this on can sometimes overload servers while it is caching the website. We recommend installing the helper plugin here to prevent this. You will need to edit that plugin once you download it to match your requirements by picking an interval that works for you. The default configuration is 500ms but we’d recommend 5000ms instead.

Activate sitemap-based cache preloading – We recommend turning this on, especially if you are using Yoast.

Enable Link Preloading – Turn this on to improve user experience, but don’t expect significant impact on page speed score. This can also affect server performance on slower servers.

Prefetch DNS RequestsWP Rocket will pre-fetch certain entries automatically, but if it misses certain external URLs that you use to load your page, you can fetch them here. More information can be found here.

Preload Fonts – You should preload any local fonts that are viable within the initial view port if possible. However, you should keep the number of fonts limited. This can improve your page performance, especially on mobile. Be sure to test thoroughly to make sure it is configured correctly.


Conclusion

There are many other options within WP Rocket for more advanced uses including fine-tuning cache rules, database optimization, CDN configuration, heartbeat control and more but most of these will have little to no impact on page speed. They are tools for keeping a site well-optimized, preventing database bloat, reducing server load, or fine-tuning existing options by excluding certain pages, cookies, or agents from caching.

It is good to explore the options but should not be necessary for an initial configuration. If you need additional assistance parsing though fine-tuning options and optimizing your page speed, get in touch. We’d be happy to assist with your WP Rocket configuration.

Share: