2026年11月12日

2026年11月12日

WP Super Cache Setup: Simple vs Expert, Exclusions, Expiry and Testing

This article is a localized edition of the Japanese original. Read the Japanese original

WP Super Cache is a caching plugin that saves WordPress pages as static HTML files and serves those files on later requests, so pages load faster. It is developed by Automattic.

Screen names in this article were checked against the files of WP Super Cache 3.1.5 as distributed on WordPress.org, and its translations, as of November 2026. This version requires WordPress 6.8 or later and PHP 7.4 or later.

1. Install and activate

In the admin, go to "Plugins → Add New", search for "WP Super Cache", install it and activate it. With WP-CLI:

wp plugin install wp-super-cache --activate

When you turn caching on, the plugin creates and modifies the following files.

  • It adds define( 'WP_CACHE', true ); to wp-config.php
  • It creates wp-content/advanced-cache.php and wp-content/wp-cache-config.php
  • It stores the cache under wp-content/cache/

So the web server must be able to write to wp-content and wp-config.php. If it cannot, the settings screen shows instructions; follow them.

2. Turn caching on in the “Easy” tab

Open "Settings → WP Super Cache". You will see the tabs "Easy", "Advanced", "CDN", "Contents", "Preload", "Plugins" and "Debug".

  1. In the "Easy" tab, select "Caching On (Recommended)" and click "Update Status".
  2. In the "Cache Tester" section of the same tab, click "Test Cache". It fetches the page twice and compares the timestamps; if it shows "The timestamps on both pages match!", caching is working.

Turning caching on from the "Easy" tab applies these recommended settings at once.

  • Caching disabled for logged in visitors
  • Simple caching (the delivery method is "Simple")
  • Cache rebuild
  • Interval garbage collection every 10 minutes with a cache lifetime of 30 minutes (if not configured already)

Many sites can start using the plugin at this point. Fine-tune the settings in the "Advanced" tab.

3. Delivery method: Simple vs Expert

Under "Cache Delivery Method" in the "Advanced" tab, choose how the saved HTML is served.

Delivery method How it works Best for
Simple (Recommended) PHP reads the cache file and returns it. .htaccess is not changed Most sites. Works as is on Nginx servers too
Expert Apache's mod_rewrite returns the cache file directly, without running PHP Apache sites whose owners can fix .htaccess themselves

Expert is faster because PHP does not run, but the plugin adds rewrite rules to your site's .htaccess (and also writes to wp-content/cache/.htaccess). If the rules do not fit your server, the site may stop loading, so back up .htaccess before choosing it. After you select Expert and click "Update Status", you can see the rules to be added in the "Mod Rewrite Rules" section of the same tab, and write them with "Update Mod_Rewrite Rules".

Sample configuration for doing the same as Expert on Nginx is published, but the plugin's screen says it is "not officially supported". On Nginx servers, Simple is the safer choice.

Both delivery methods require permalinks other than "Plain" (the ?p=123 form).

4. Main settings in the “Advanced” tab

Under "Cache Restrictions" in the "Miscellaneous" group, choose who gets cached pages.

Option Behavior
Enable caching for all visitors. Logged-in users also get cached pages
Disable caching for visitors who have a cookie set in their browser. Anyone with a cookie, including people who left a comment, does not get cached pages
Disable caching for logged in visitors. (Recommended) Logged-in users always get a page generated by PHP

Other commonly used settings:

  • Don't cache pages with GET parameters. (?x=y at the end of a url): turn this on if you have pages whose content changes with search or filter parameters.
  • Compress pages so they're served more quickly to visitors.: stores the cache compressed with gzip. It is off by default because pages break on some setups, for example when the server already compresses output. Check your pages after turning it on.
  • Cache rebuild: serves the old cache while a new one is being generated.
  • Clear all cache files when a post or page is published or updated.: clears the whole site's cache whenever you update a post. Use it when you want the front page or a sidebar list of recent posts to update immediately.

After changing settings, click "Update Status" at the bottom of the screen.

5. Exclude pages from caching

In "Rejected URL Strings" in the same "Advanced" tab, enter strings contained in URLs you do not want cached, one per line, and click "Save Strings". Pages whose URL contains one of the strings are not cached.

/contact/
/members/

The defaults wp-.*\.php and index\.php are already there. Leave them in place.

For the WooCommerce Cart, Checkout and My account pages, WooCommerce itself signals "do not cache this page" (the DONOTCACHEPAGE constant), and WP Super Cache respects it. Normally you do not need to add these pages to the exclusions yourself. If another plugin's pages show per-user content but still get cached, add them here.

6. Expiry and garbage collection

Old cache files are not deleted the moment they expire. They are removed by a periodic cleanup called "garbage collection". The settings are under "Expiry Time & Garbage Collection" in the "Advanced" tab.

Setting Meaning
Cache Timeout How many seconds a cache file is considered fresh. Set 0 to disable garbage collection
Scheduler (Timer) Looks for and deletes stale cache files every given number of seconds
Scheduler (Clock) Looks for and deletes stale cache files at a given time (UTC)

The settings screen suggests a timeout of 3600 seconds and a timer of 600 seconds for sites with widgets and feeds in the sidebar. Use shorter values for sites that update often and longer ones for sites that rarely change. Click "Change Expiration" after editing.

Garbage collection runs on WordPress's WP-Cron. Where WP-Cron does not run, old cache files keep piling up, so check that wp-cron.php is being called from the server's cron.

The cache for related pages being cleared when you publish a post or someone leaves a comment is a separate mechanism from garbage collection.

7. Preload

Click "Preload Cache Now" in the "Preload" tab to walk through your published posts and pages, newest first, and create cache files for them. Even the first visitor then gets a cached page.

On sites with many posts (10,000 or more, for example) this creates a large number of files, so consider limiting it to the newest posts, as the screen suggests. On shared hosting, watch the limits on disk space and number of files in particular.

When "Preload mode" is on, normal garbage collection stops and preloaded files never expire.

8. Use a CDN

In the "CDN" tab, turn on "Enable CDN Support", enter the CDN address in "Off-site URL" (for example https://cdn.example.com, without a trailing /) and click "Save Changes". The plugin then rewrites the URLs of files in wp-content and wp-includes (excluding .php) to the CDN address. Set up the CDN to fetch files from your site (origin pull).

Before saving, follow the screen's warning: replace the host in a static file's URL with the CDN address, open it, and check that it loads. Delete the cache after setting this up.

9. Check that caching works

Besides the Cache Tester, you can check by viewing the page source while logged out. If "Cache Status Messages" is enabled in the "Debug" tab, comments like these appear at the end of the HTML.

<!-- Dynamic page generated in 0.450 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2026-11-10 12:00:00 -->

If the time in Cached page generated does not change when you reload, the cache is being served. With the recommended settings, logged-in users do not get cached pages, so check from another browser or a private window.

10. Delete the cache

  • Whole site: "Delete Cache" in the "Easy" tab, or "Delete Cache" in the admin bar shown while logged in (clicking it in the admin clears the whole site; clicking it on a front-end page clears only that page)
  • Expired files only: "Delete Expired" in the "Contents" tab

WP Super Cache itself does not include any WP-CLI commands. Also, wp cache flush clears the WordPress object cache; it does not clear WP Super Cache's page cache.

When it does not work

These are the checks from the plugin's readme that come up most often.

  • Is define( 'WP_CACHE', true ); above the require_once ABSPATH . 'wp-settings.php'; line in wp-config.php?
  • Does wp-content/advanced-cache.php exist, and is the plugin path inside it correct? If no cache is created at all, delete this file and open the settings screen again; it is recreated
  • Are folders and files being created under wp-content/cache/supercache/?
  • If the browser tries to download the page or shows garbled text after turning on compression, turn off "Compress pages"
  • Is the cache folder on a network location such as NFS? It must be on a local disk

Notes

  • Use only one caching plugin. Combining it with another page caching plugin or your hosting company's cache feature can serve stale pages or make the plugins fight over configuration files.
  • Exclude pages that show per-user content even to logged-out visitors, such as membership sites.
  • wp-content/cache/ is a place for temporary files. The plugin deletes files there, so do not keep important files in it.
  • To stop using the plugin, deactivate and delete it from the plugin list; advanced-cache.php and wp-cache-config.php are cleaned up too. If files remain, delete them by hand together with the WP_CACHE line in wp-config.php.

Questions about WordPress? The publisher of this site is based in Japan and replies in Japanese. Contact (Japanese)

お気軽にご相談ください

お見積りへ お問い合わせへ
▲