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:
- Navigate to the Settings > WP Super Cache section of your WordPress admin dashboard.
- 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.
- Click the Update Status button, which refreshes the page.
- 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
- Click the Save Strings button and wait for the page to refresh.
- Open the Easy tab and scroll down to the Cache Tester section.
- 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:
- Open the WP Super Cache admin page.
- Click the Easy tab.
- Click the Test Cache button, which tests if WP Super Cache is functioning.
- The following appears when you click the Test Cache button:
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:
- Log into your Cloudflare account.
- In the left menu, click the Speed tab and then click Optimization.
- Scroll down to the Auto Minify section and un-check the HTML option.
- Open the Caching tab and then click Configuration.
- In the first section, click the Purge Everything button.
- 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: