Configure WP Rocket for WordPress Websites on Cloudways

While WP Rocket doesn’t have unique integration with Cloudways in terms of caching, as it does with Kinsta, it still should be considered one of the top caching plugins for any site hosted at Cloudways.

Before You Begin

Solution Overlap

Overlapping functionality can degrade the performance of your website and/or cause conflicts. Before you begin, you will want to remove all other caching-related plugins.

Also, for any optimization solutions you have implemented (plugins, code snippets, etc.) that overlap with the feature set of WP Rocket, you’ll want to a.)  remove those solutions or b.) adjust the settings either within the solution or WP Rocket so there is no overlap in functionality.

As just one example, if you have Perfmatters already performing database optimizations, you can turn this off in Perfmatters, or just not configure it on the WP Rocket side.

WP Rocket Installation

  1. Grab your copy of WP Rocket or get the plugin by signing up for WordPress Website Care.
  2. Install and activate WP Rocket.
  3. Optionally, click the ‘No, thanks’ button to opt out of letting WP Rocket collect data about your website.

WP Rocket Settings for Cloudways

If you are hosting your WordPress website with Cloudways, please follow the instructions from this section. Unless I specifically mention something, it is safe to assume you do not need to concern yourself with it.

Cache

User Cache

If you are running a WordPress website that also has a membership component (bbPress, BuddyPress, Learndash, etc.), you will likely want to enable this setting.

Cache Lifespan

The default setting should be fine here, but if you notice that your cache is holding onto content a bit too long, you may want to consider lowering the value here.

Just know that the lower this setting goes, the more server resources will be used, and while this may not be a big deal, it’s definitely something to keep in mind especially if you are on cheaper hosting.

File Optimization

CSS Files

  • Minify CSS files: Enable.
  • Optimize CSS delivery: Enable. (Note: See the ‘Testing’ section of this guide.).

JavaScript Files

  • Minify JavaScript files: Enable.
  • Load JavaScript deferred: Enable. (Note: See the ‘Testing’ section of this guide.).
  • Delay JavaScript Execution: Enable. (Note: See the ‘Testing’ section of this guide.).

Minification and Varnish

If you are going to use the Cloudways Varnish caching,  you will want to add a URL exclusion to allow the minification process to run smoothly.

  1. Cloudways Dashboard > Select your Application (i.e. Website).
  2. Application Management > Application Settings.
  3. Varnish Settings > Click Add New Rule.
  4. Value Line > Paste in the following variable: (.*)/?f=(.*)
  5. Save changes.

Media

LazyLoad

If you are already using an image optimization plugin like ShortPixel Adaptive Images (my recommended image optimization plugin for WordPress websites), they will already provide this functionality, so you would want to skip this section in that case.

Emoji

Enable as long as you’re not using Emojis and you’re not already optimizing this with another solution like Perfmatters.

Embeds

Enable as long as you have not already done so with other solutions like Perfmatters or Cloudflare’s Hotlink Protection.

I recommend using Cloudflare’s Scrape Shield feature (Cloudflare > Scrape Shield > Hotlink Protection) for this, which is part of their FREE plan.

WebP Compatability

Please refer to the LazyLoad section above.

Preload

Preload Cache

  • Activate Preloading > Enable
  • Activate Preloading > Activate sitemap-based cache preloading > Enable
  • Activate Preloading > Activate sitemap-based cache preloading >XML Sitemap > Enable

Preload Links

Enable as long as you’re not already optimizing this with another solution like Perfmatters.

Prefetch DNS Requests

Utilize this feature if you can, but don’t just use it to use it, and be sure you’re not already optimizing this with another solution like Perfmatters.

Preload Fonts

Utilize this feature if you can, but don’t just use it to use it, and be sure you’re not already optimizing this with another solution like Perfmatters.

Advanced Rules

Never Cache URL(s)

At a minimum, I recommend excluding all Policy Pages (Privacy, Refunds, etc.) from caching.

Note: WP Rocket already excludes the WooCommerce ‘Cart’, ‘Checkout’, and ‘My Account’ pages.

Database

As you go through these settings be sure you’re not already optimizing this with another solution like Perfmatters.

Post Cleanup, Comments Cleanup, and Transients Cleanup

Enable all options.

Database Cleanup

Do not enable this if your application (i.e. WordPress site) is using MariaDB for its database technology, as this can do more harm than good.

You can easily find out what database technology is being used for your site, with the Cloudways dashboard (Applications > Server Management > Settings & Packages > Packages > MySQL).

Note: I recommend using MariaDB over MySQL and if you make the switch, be sure to go with the latest version of MariaDB that’s available to you.

Automatic Cleanup

Enable and set to ‘Weekly’.

CDN

This is not needed if you are already using Cloudflare (my preference), but I also recommend BunnyCDN and the steps below do apply to that particular solution, as well as many other CDN solutions.

  1. Check the ‘Enable Content Delivery Network’ box.
  2. CDN Name(s) > Paste in the values from your CDN vendor.
  3. Save changes.

Heartbeat

Enable as long as you’re not using Emojis and you’re not already optimizing this with another solution like Perfmatters.

  1. Check the ‘Control Heartbeat’ box.
  2. Leave the default options. (Note: I’ve seen where disabling the WP Heartbeat completely for ‘Behavior in backend’ and ‘Behavior in Frontend’ works just fine, but you will need to thoroughly test for yourself since every site is different.).
  3. Save changes.

Add-ons

Rocket Add-ons

Cloudflare

Enable if you are using Cloudflare and be sure to check out the Implement Cloudflare’s CDN for Better WordPress Security and Performance guide for more information.

Important: If you are using Cloudflare’s APO service, be sure NOT to enable this add-on.

Sucuri

Enable if you are using the Sucuri Website Firewall with caching enabled, as this will keep the caches in sync so that your site will always be updated with your latest content. 

  1. Toggle on the add-on.
  2. Click the Modify Options button.
  3. Grab your Sucuri API key and plug it into WP Rocket.
  4. Save changes.

Image Optimization

This section is simply a prompt to install WP Rocket’s Imagify plugin and while you can certainly do that, I recommend the ShortPixel Adaptive Images plugin, if you are going to go the plugin route.

Tools

This section is pretty powerful, providing you the option of import/export configurations and if you run into issues with a particular build of WP Rocket, you can easily roll back to a previous version without having to restore your entire website.

Testing

After certain settings are enabled, be sure to run thorough tests by clearing every level of caching and browsing the critical areas of your site to ensure everything is looking as it should and working properly.

Throughout this guide, I’ve noted the settings I feel warrant going through the testing process, but to always be on the safe side, consider thorough testing any time to touch any setting.

Support

If you find yourself running into issues, there are many resources available to you.

Video Tutorial