fbpx
  1. Home
  2. Knowledge Base
  3. Resources
  4. Resources
  5. Configuring Caching and Optimizations

Configuring Caching and Optimizations

While MemberMouse is compatible with all types of caching, it will require its files and core pages to be excluded from caching and other optimizations. This allows MemberMouse to reliably provide uniquely dynamic content to each individual visiting your site and maintain proper scripting functionality. If caching is not configured correctly, various unpredictable problems can arise, including login, email, and payment problems, and more.

This guide is designed to help you understand how caching works with MemberMouse and how to set it so the plugin features work reliably, but since there are so many variables involved with your server, caching types, configurations, and plugin choices, this guide is not comprehensive for all scenarios. Thorough testing after any adjustments is a requirement, and professional guidance may be necessary for complex sites with various dynamic plugins or other plugins which require unique configurations.

Get Started – What Caching Do You Use?

Caching and optimization can be controlled in various locations, depending on the kind of hosting used and the tools you use. You will want to carefully verify what you may be using so you can learn the proper steps to configure and maintain them.

Common caching and optimizing tools:

  • Often, hosts will offer unique options for server caching. 
  • You may be using caching plugins that control server caching
  • You may be using optimization plugins. 
  • DNS-based caching like Cloudflare can store files offsite or deliver them via unique optimization.
  • CDNs can store file data offsite

Less commonly, caching can be left over from past plugins or hosts. Regularly check your MU plugin folder, your wp-config and htaccess files, and your plugins folder. There, you may find that past plugins or hosts have added code and folders that need to be manually removed or adjusted. 

Once you know what kind of caching you have, you must adjust it to work with your dynamic site. This guide will help you adjust your caching tools so MemberMouse functions properly.

But isn't it important to have your entire site cached?

It is important to cache a website to enhance its speed and reduce the load on the server. Caching allows files and data to be stored and served repeatedly without loading them from the server. This is necessary for static elements; however, dynamic aspects such as forums, memberships, logins, checkouts, and personal data need exclusions from optimizations to function uniquely without relation to anything else. Therefore, it is crucial to configure caching correctly to ensure it benefits the website.

You can use just about any caching mechanism you choose, as long as it has options to exclude specific pages and files of your site. Most caching tools have this option, but you may need to refer to its documentation to learn where and how.

File optimization is the most common place where technical errors occur. Optimizing files, no matter the plugin or theme, is very sensitive to inaccuracies. Therefore, if you are not skilled at optimizing scripts properly, it is best not to do so until you learn the correct setup or hire someone to do it for you. Just like caching, MemberMouse cannot have its files optimized. Common optimization processes include combining files, minifying files, delaying file loading, lazy loading, and more.

How do I exclude pages and files?

Excluding pages or parts of your site is a normal part of optimization. While many scripts and pages are already excluded from your caching to avoid common problems, some need to be added. Where to add these adjustments depends on what kind of caching you use. Begin by learning what kind of caching you have, then check with its documentation to learn more about adding exclusions.

  • Cloudflare requires Page Rules to add exclusions if you use their caching or Rocket Loader.
  • WP Engine, Kinsta, Cloudways, and many other hosts offer strong server caching, and exclusions must be set there. You can check your hosting panel to add exclusions or contact their support.
  • Most caching plugins have an area to prevent files and pages from being cached called “exclusions.” If your cache plugin does not have this option, you must switch to a more capable plugin.
  • Numerous “optimization” plugins, such as Autoptimize, WP-Optimize, Hummingbird, and Nitro, need to be set not to optimize any of the core pages or MemberMouse files. Depending on your settings, they often have a meta box on each page that allows you to disable their features.


What exactly needs to be excluded from optimization

Core Pages: Each of your core pages needs to be excluded. To find a complete list of your core pages, please navigate to All Pages in your admin panel. You will find a filter to “Show only MM Core Pages,” and using it will provide a complete list of pages to exclude.

Each core page listed here needs to be excluded. You must note the URL exactly, so if it has a trailing slash, include it. You should have at least 11 pages to exclude and often more if custom pages have been made.

You will need to add wildcards to the URLs of the Checkout pages, the Reset Password page, the Error Page, and the Confirmation pages. Wildcards account for variables appended to the end of the URL. So if the URL is https://yoursite.com/checkout/, then with a wildcard, it should look like this in our exclusion settings: https://yoursite.com/checkout/*

In some cases, you do not include the domain, like this: /checkout/*

Please note that some exclusion tools may require a unique symbol for a wildcard. Please verify with your caching tools documentation to verify which is right for you. WP-Rocket, for example, requires (.*) as a wildcard. In that case, the URL will look like this: https://yoursite.com/checkout/(.*)/

Files: Add this file path to exclude all MemberMouse files. This may be required for each area where optimizations or cache are active.

  • /wp-content/plugins/membermouse/*


Courses: If using courses, be sure to exclude your courses URL, too.

Other plugins: Other plugins can also require exclusions. While some popular plugins have the basics already excluded, many plugins still need caching adjustments to perform correctly. Plugins like forums, comments, forms, carts, and more may require exclusions similar to MemberMouse, but you will want to check with their documentation on the exact details.

Common Problems we often see with caching

  • No trailing slash is included in the URL of cache exclusions.
  • No wildcard is included in the cache exclusions.
  • File-based caching, minification, and combination must all have their individual exclusions made. This differs from caching and is commonly set incorrectly. 
  • WP-Rocket and also Perfmatters both have a meta box on each core page that also needs to be adjusted. It looks like this:


  • If a CDN is used, we sometimes see all site files run through the CDN. A professional should be consulted to see if this is the best setting for your needs. It adds a tremendous layer of complexity to managing a site.

    Most commonly, only images and other static uploads are run through the CDN; we recommend this configuration in most cases.
  • Most caching plugins offer an option to cache logged-in users. Commonly, this should be unchecked to prevent caching of logged-in users.
  • If you experiment with cache plugins, remnants from other cache plugins can sometimes be found in the config or htaccess files. Similarly, a MU plugin can get left behind from previous hosts. This can complicate troubleshooting cache problems, and it's a common issue.

Was this article helpful?

Related Articles