Find the best settings for your site

Every site has a different theme, a different set of plugins, and different content. So the best settings will vary from site to site. In this article you'll learn the safest way to experiment with the most useful and most commonly used WP Rocket settings. 

The goal is always to make your site faster. And activating more options doesn’t always result in more speed. So don’t worry if you’re not able to turn everything on. 

It’s a good idea to take some benchmark speed tests before you begin configuration, then again afterward. 


Best practices for configuration

When testing options in WP Rocket, please use the following process:

  • Activate options one-at-a-time, not everything at once.
  • After each option that you activate, check your site in a browser window where you are not logged in to WordPress. An incognito/private window works well. By doing this you will be able to see immediately if a particular option causes any issue. 
  • Check a few types of pages on your site. If anything doesn’t look right, don’t panic! Disable the last option you activated and your site will return to normal.

Did you know? 
After you activate an option, there’s no need to clear the cache. WP Rocket will take care of that for you. 


Solving problems

You can fix any problems caused by the optimizations as shown below:

  • Adding exclusions or safelisting values
    • You can exclude assets from being manipulated by the different optimizations.
    • For most features, this can be done using the exclusion boxes.
    • This is the most common approach because it allows optimizations to keep running on the rest of the assets.
  • Disabling the problematic option
    • You can also keep an optimization deactivated for the affected page(s) using WP Rocket's sidebar. This would be useful if the feature affects only some pages, and you want to keep the optimization running on the rest of the pages.
    • In some cases, you might need to keep an option disabled for the whole site. This is recommended if there are too many exclusions, too many affected pages, and if the performance benefit is not crucial for the overall site speed.

More details about these fixing approaches can be found in the following sections of this article, as well as across the rest of the documentation.


The File Optimization tab

This tab contains WP Rocket's optimizations for CSS and JavaScript assets. Here are the recommended steps to follow in this tab:

  1. You can start by enabling the Minify CSS files and Minify JavaScript files features, following the best practices.

    Minifying assets is usually a safe optimization, but we have prepared this guide in case of issues.
  2. Once you've made sure everything went ok, you can enable the Load JavaScript deferred feature.

    Deferring the JavaScript will have a higher impact on JavaScript performance, allowing the browser to render the site better.

    If you find issues, please check our guide.
  3. Enable the Delay JavaScript execution, and check your site thoroughly.

    Delaying the execution of JavaScript is the most powerful JavaScript optimization in WP Rocket.

    And if you spot issues, please use the One-click exclusions section in your WP Rocket plugin settings page. You can also check this guide.
  4. Finally, you should enable the Remove Unused CSS feature under the Optimize CSS delivery option.

    This feature is the most powerful CSS optimization, but it's  asynchronous, that is, it takes some time before the Used CSS is applied to the site, read more

    If you notice that Remove Unused CSS breaks a layout element, please check this article.

    In cases when Remove Unused CSS causes too many problems, you can use the Load CSS Asynchronously feature to optimize the delivery of CSS.

The Media tab

This tab contains options to optimize the loading of images and iframes, and to set missing image dimensions. Here you should:

  1. Enable the LazyLoad feature.

    This will result in saving loading time and data, as the images will be displayed as visitors scroll down the page.

    In case there are problems, you may need to exclude some images from being lazyloaded. For more information, please check the links here.
  2. If everything looks ok, you can enable the LazyLoad for iframes and videos feature, and its Replace YouTube iframe with preview image sub-option.
  3. Lastly, you can enable the Add missing image dimensions feature to avoid layout shifts while your site is being rendered.

The Cache tab

The Mobile Cache feature will be enabled by default. 

In addition to this, you should use the Separate cache files for mobile devices sub-option to ensure the mobile-specific version of your site is delivered as expected.


Other features and tabs

WP Rocket includes more features in the tabs described in this article, and across other tabs, such as:

The additional optimizations and rules in those tabs are used for fine-tuning WP Rocket.

For example, the most common advanced option is Never Cache URL(s), which is used along membership plugins.

However, in most cases, if you're not sure of what they're used for, it's highly possible you won't need to use them.


Configuration for large websites

If you own a big website, with thousands of pages or products, you may also take a look at our configuration for large websites article, where you'll find some guidelines to balance WP Rocket's optimizations with the available server resources.

When in doubt, please contact our support team.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.