Configure WP Rocket for MyListing Websites on Cloudways

Get the knowledge your online business needs to succeed.

Overview

Our Configure WP Rocket for MyListing Websites on Cloudways guide will show you how to easily implement this solution to speed up and manage your MyListing websites.

Lay the Groundwork
WP Rocket and Cloudways
Video Tutorial

Lay the Groundwork

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.

Just as 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. (Note: The Club offers WP Rocket for qualifying memberships as well as through paid services like MyListing Website Maintenance.).
  2. Install and activate WP Rocket.
  3. Click the ‘No, thanks’ button to opt-out of letting WP Rocket collect data about your website.

WP Rocket and Cloudways

If you are hosting your MyListing website with Cloudways, please follow the instructions from this section.

Unless a setting is specifically mentioned, assume the default settings are correct.

Cache

The section provides the first opportunity to disable the WP Rocket sidebar, which we recommend doing to prevent one less external call (i.e. outside of your website) to WP Rocket resources, WP dashboard overhead, and unnecessary clutter.

User Cache

Enable this setting, if you have your MyListing website turned into a membership site, where users must log in to see specific content.

File Optimization

CSS Files

  • Minify CSS files: Enable
  • Optimize CSS delivery: Enable

JavaScript Files

  • Remove jQuery Migrate: Enable
  • Minify JavaScript files: Enable
  • Load JavaScript deferred: Enable
  • Delay JavaScript Execution: See below
JavaScript Files > Delay JavaScript Execution

We recommend leaving this off to start and to see how your website is performing after following this guide and after implementing other optimization recommendations.

If you are also using Perfmatters for example, that plugin allows you to stop unnecessary JavaScript from loading in the first place, so delaying it with WP Rocket would be a wasted effort.

If you still need to squeeze out some more performance from your website, consider circling back to this option and turning it on.

When/if you turn it on, be sure to test your website thoroughly, adjusting WP Rocket’s preloaded list of scripts as needed.

Obviously, you can add your own scripts to the list, but again, just be sure to test as you go along.

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 using an image optimization plugin that provides the same functionality as WP Rocket, we recommend ignoring this section and using that plugin for LazyLoad operations.

You may find situations where you need to use a combination of your image optimization plugin and WP Rocket.

For example, our preferred image optimization plugin, ShortPixel AI, automatically provides Lazy Loading of images but does not provide Lazy Loading for iframes and videos like WP Rocket does.

So, in the above case, we let Shortpixel AI Lazy Load images and have WP Rocket Lazy Load iframes and videos.

When/if you allow WP Rocket to Lazy Load iframes, you can also elect to replace YouTube iframes with a preview image to, eliminate the need for iframes to make external YouTube calls.

Note: If you’re not using an image optimization plugin (we highly recommend you do), WordPress automatically provides Lazy Loading of images.

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’re not using Embeds and you’re not already optimizing this with another solution like Perfmatters.

WebP Compatability

Please refer to the LazyLoad section above.

Preload

Preload Cache

Enable Activate sitemap-based cache preloading

Prefetch DNS Requests

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

Note: This is a more advanced topic and we’ll circle back with a video or separate tutorial to link to for this.

Preload Fonts

Enable.

Note: This is a more advanced topic and we’ll circle back with a video or separate tutorial to link to for this.

Advanced Rules

Never Cache URL(s)

We recommend excluding the following pages from caching, at a minimum.

  • All Policy Pages (Privacy, Refunds, etc.).
  • All MyListing Explore Pages.
  • MyListing’s Core ‘Add Listing’ page.
  • MyListing’s ‘Claim Listing’ page.

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

Database

Note: You could already be optimizing your database within plugins like Perfmatters, so be sure to not double up.

Post, Comments, Transients, and Database Cleanup

Enable all options.

Automatic Cleanup

Enable and set to ‘Weekly’.

CDN

Note: This is not needed if you are already using Cloudflare (recommended) or Sucuri.

If you’re not using the above, you can follow the steps below to add integrate your CDN with WP Rocket.

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

Heartbeat

Note: You could already be optimizing the WordPress heartbeat within plugins like Perfmatters, so be sure to not double up.

  1. Check the ‘Control Heartbeat’ box.
  2. Leave the default options. (Note: We have 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

One-click Rocket Add-ons

Google Tracking

Enable if you are only using Google Analytics and not Google Tag Manager.

Note: You could already be enabling this functionality within plugins like Perfmatters.

Note: We recommend using Google Tag Manager, so if you follow our recommendation, this section can be skipped.

Facebook Pixel

Enable if applicable to your website.

Note: We recommend using Google Tag Manager, so if you follow our recommendation, this section can be skipped.

Note: The official Facebook Pixel plugin, Facebook for WooCommerce, and the Pixel Caffeine plugins are supported, but Google Tag Manager, and Pixel Your Site are not.

Varnish

Our recommendation is to try and not use Varnish with your MyListing website, due to potential issues with WooCommerce.

If you properly optimize your website by performing steps to clean up assets with Perfmatters, optimizing your images with ShortPixel AI, etc., you can likely avoid Varnish altogether.

In short, Varnish may not be worth the risk and should be enabled as a last option.

Enable if you have Varnish enabled on your website.

Note: We recommend using Google Tag Manager, so if you follow our recommendation, this section can be skipped.

Note: The official Facebook Pixel plugin, Facebook for WooCommerce, and the Pixel Caffeine plugins are supported, but Google Tag Manager, and Pixel Your Site are not.

Note: If you use a proxy like Cloudflare, clearing varnish cache may not work effectively, and to fix this the following code snippet can be used.

  1. Create a folder named ‘mu-modules’ in your wp-content folder.
  2. Using your preferred text editor, create a new file, and put the following code in it.

Note: Remember to replace example.com with your domain name.

 defined( 'ABSPATH' ) or die( 'Cheatin’ uh?' );
/**
* Plugin Name: Fix Varnish Auto Purge with Proxy and WP Rocket
* Author: WP Rocket Support Team
* Author URI: http://wp-rocket.me/
* License: GNU General Public License v3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/

add_filter( 'rocket_varnish_purge_request_host', '__rocket_varnish_custom_hostname' );
function __rocket_varnish_custom_hostname() {
return 'example.com';
}

add_filter( 'rocket_varnish_ip', '__rocket_varnish_custom_ip' );
function __rocket_varnish_custom_ip() {
return 'localhost';
}
  1. Save the file as wp-rocket-varnish-purge-proxy.php
  2. Upload this file to the mu-modules folder created in step 1.
  3. Finally, make sure to deactivate and re-activate WP Rocket (you may also need to manually clear the cache of your proxy).

To verify your Varnish was properly cleared, you can check the Age header, and to do that in Chrome, follow the steps below.

  1. With your website open, press Ctrl+Shift+I.
  2. Click on the Network tab, and reload your website.
  3. Look at the first request and check the value of the age header, which should be reset to 0.

Rocket Add-ons

Cloudflare

Enable if you are using Cloudflare for your website and following our guide for setting it up.

This is because we are recommending Cloudflare’s Page Rule option to ‘Cache Everything’, and this add-on is required to sync the cache purging.

  1. Toggle on the add-on.
  2. Click the Modify Options button.
  3. Grab your Cloudflare credentials (API key, account email, and Zone iD) and plug them into WP Rocket. (Note: If you’ve already followed our Cloudflare CDN for MyListing Websites guide, you’re ready to go and you don’t need to adjust the Cloudflare settings here.).
  4. Save changes.
Sucuri

Enable if you are using the Sucuri Website Firewall with caching enabled.

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.

We recommend ShortPixel AI over Imagify because it is more powerful, does things for MyListing that Imagify can’t do, and you get more for your money if you take advantage of the Club’s Bonus Credits.

Tools

This section is pretty powerful, providing you the option of exporting your configuration and importing it to other websites you own or manage.

Additionally, if you run into issues with a particular build of WP Rocket, you can roll back to a previous version.

MyListing Theme Video Tutorial

Play Video

Let's empower others. Share the knowledge.

Share on twitter
Twitter
Share on facebook
Facebook
Share on linkedin
LinkedIn
Scroll to Top

Find a bug or typo? Please let us know.