Configuring WP Super Cache

 

Overview

After you install WP Super Cache, you can use the following information to further optimize the plugin.

Configuring the WP Super Cache plugin

To configure the WP Super Cache plugin:

  1. Navigate to the Settings > WP Super Cache section of your WordPress admin dashboard.
  2. Open the Advanced tab on the WP Super Cache Settings page and make sure the following options are checked/enabled:
    • Caching: Enable Caching
    • Cache Delivery Method: Expert
      • This option adds rules to the site's .htaccess file
    • Miscellaneous / Cache Restrictions:
      • Disable caching for logged in visitors.
      • Don't cache pages with GET parameters.
      • Compress pages so they're served more quickly to visitors.
      • Cache rebuild.
    • Advanced
      • Extra homepage checks.
  3. Click the Update Status button, which refreshes the page.
  4. Scroll down to Rejected URL Strings section and make sure the following exclusions are included within the text box:
    wp-.*\.php
    index\.php
    /store
    /cart
    /checkout
    /my-account
    /feed
    /addons
    /administrator
    /resetpass
    /register
    /login
    /mepr
    /account
    /thank-you
    /ref
  5. Click the Save Strings button and wait for the page to refresh.
  6. Open the Easy tab and scroll down to the Cache Tester section.
  7. Click the Test Cache button and wait for the results.

The following message appears, which indicates that your setup has been successfully configured:

The timestamps on both pages match!

Verifying WP Super Cache is actually working

To test WP Super Cache:

  1. Open the WP Super Cache admin page.
  2. Click the Easy tab.
  3. Click the Test Cache button, which tests if WP Super Cache is functioning.
    The following appears when you click the Test Cache button:
    10 WP Super Cache.fw.png

Timestamps differ or were not found error

You may see the following error message when you test your cache:

The pages do not match! Timestamps differ or were not found!

This is a Cloudflare Minify issue and occurs when you have enabled Cloudflare on your domain.

To fix:

  1. Log into your Cloudflare account.
  2. In the left menu, click the Speed tab and then click Optimization.
  3. Scroll down to the Auto Minify section and un-check the HTML option.
  4. Open the Caching tab and then click Configuration.
  5. In the first section, click the Purge Everything button.
  6. Wait at least 30 seconds and then test your cache again in WordPress. It should now show that the timestamps match.

Changing the caching type

Open the Advanced tab to view the various caching types. WP Super Cache supports two modes:

  • Simple
  • Expert (mod_rewrite)

You can change these settings on the Advanced tab.

There are pros and cons for each option: if performance is a priority or if your content is not updating that often, use the Expert (mod_rewrite) option, which speeds up the Time to First Byte (TTFB) by orders of magnitude. This is because it doesn't have to search for additional PHP handlers to parse the cached file. Instead, it writes the content as raw HTML and then serves the HTML by itself.

If you're using Nginx, use the Simple option instead.

Making WP Super Cache work with Nginx

You can find your wordpress.conf file on your Nginx server in the following directory. Change the username to your Shell user and example.com to your website:

/home/username/nginx/example.com/wordpress.conf

The following are a few snippets from a wordpress.conf file:

###### rest of wordpress.conf above...
###
# only rewrite to the supercache file if it actually exists
if (-f $document_root$supercache_file) {
  rewrite ^(.*)$ $supercache_file break;
}

### stats
if ($request_uri ~* ^/(stats|doc|failed_auth\.html).*$) {
  break;
}

# all other requests go to WordPress
if (!-e $request_filename) {
  rewrite ^.*$ /index.php last;
}

See the following article for further information on using WordPress with Nginx:

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?