WP Super Cache Settings

WP Super Cache plugin comes highly recommended but unfortunately the WP Super Cache Settings are not always straightforward.

I shall not go into the technical details of what a cache plugin does for your WordPress site.  (Honestly, I couldn’t get into the technical details even if I wanted to!)  Sufficient for our purposes to say that it helps the performance of your WordPress site (i.e. speed of loading).  And that has become even more important these days as it has become a factor in SEO (Search Engine Optimization). Google now pays attention to a site’s load speed in its algorithms.

As I noted in Essential WordPress Plugins, even though the WP (WordPress) cache plugin was not considered an “essential” plugin by my chosen internet gurus for our Blog Monetization Experiment, I do think that how fast your site loads is important.  How many times have we forsaken a site when it proved to be loading too slowly?

WP Super Cache plugin helps improve a WordPress site’s speed and performance.

 

WP Super Cache vs W3 Total Cache

I originally wanted to go with W3 Total Cache plugin.  Joost de Valk from Yoast.com recommends it in W3 Total Cache and why you should be using it.

But I encountered too many problems in trying to install the W3 Total Cache. W3 Total Cache error message just would not go away no matter what I did.

W3 Total Cache plugin gave me errors I could not resolve.

Both the WP Super Cache and W3 Total Cache, on investigation, are regarded and recommended as highly. So I went with WP Super Cache plugin instead.

Sidenote as at 10 Aug 2013: WP Super Cache has been downloaded about 4.8 million times! W3 Total Cache downloaded about 2.5 million times.
Tip: if you, like me, installed and tried to activate W3 Total Cache (W3TC) but was only rewarded with errors, then note that it’s uninstall is not as simple as it is for other plugins.  Refer to “How to Remove W3 Total Cache” by Red Star Development (see Reference at bottom of page).

 


Installing & Activating the WP Super Cache

Warning: If you have already installed another cache plugin, that must be removed first and very specifically.  Please read the installations given at WordPress.org Plugin Directory >> Installation instructions.

 

Before I go on to the WP Super Cache settings and setup, let it be known that I also encountered errors on attempting to activate the WPSC (WP Super Cache).  I will share my scenario with you in case you come across the same error.

First if you get an error telling you have not set your permalinks, then set your permalink as per article Postname and Custom URL for your WordPress site.

This is the next error I got.  The “WPCACHEHOME” error. Not a soothing sight!

wp supercache WPCACHEHOME problem

WP Super Cache: Error message on activation

I tried all the suggestions to no avail. The gleaned the best answer from the forum at WordPress.org: “Warning! WP Super Cache caching broken.

Using the suggestions there, here is what I did.

1) Using either you FTP or your cPanel >> File Manager, navigate to your WordPress installation directory.

2) Look for your [WP installation directory]/wp-config.php file. Open it to edit. At the very bottom of the file, this is what I had:

wp-supercache-original-wp-config-file

Original ending code in wp-config.php

 

I modified the wp-config.php file by adding the 2 lines of code. Saved file.

wp-supercache-changed-wp-config-file

2 lines of code added that defines the path for WPCACHEHOME variable

The 2 lines of code. Specify your own “PATH”.

define( 'WP_CACHE', true );
define( 'WPCACHEHOME', 'PATH/wp-content/plugins/wp-super-cache/' );

 

2) Then on checking the /wp-content/ folder, I noted that I did not have the advanced-cache.php file (which should have been automatically corrected).

So go to /wp-content/plugins/wp-super-cache/ and find the file: advanced-cache.php

Copy that advanced-cache.php file to the /wp-content/ folder.

And it worked!

 


WP Super Cache Settings

As with the WordPress SEO setup, the WP Super Cache Settings are not exactly easy nor simple.  Nor do the references I found give all the same recommended settings.  So once again, I have combined all recommendations from:

  1. WP Super Cache Recommended settings from WordPress.org Plugins Directory
  2. Recommended WP Super Cache Settings For Beginners (webhostinghero.com)
  3. How to Install and Setup WP Super Cache and Fix Commentluv Error (crazytechsolutions.org)

 


My WP Super Cache Settings

Tip: basically it is just ticking the “Recommended” settings, with a few minor adjustments

You will see the WP Super Cache Settings set out horizontally in a number of tabs when  you go to:

WP admin >> Plugins >> Installed Plugins >> WP Super Cache >> Settings

 

We will go from left to right on those tabs.

WP SUPER CACHE Settings: [Easy]

wp-super-cache-easy tab

WP Super Cache Settings: Easy

 

WP SUPER CACHE Settings: [Advanced]

Under the Advanced tab, there are multiple sub-sections.  We will be covering the following sub-sections:

  • Caching
  • Miscellaneous
  • Advanced
  • Mod Rewrite Rules
  • Expiry Time & Garbage Collection
  • Rejected User Agents.

Caching, Miscellaneous, & Advanced sub-sections

wp-super-cache-advanced1

Caching & Miscellaneous section under Advanced tab

wp-super-cache-advanced2

Advanced section under the Advanced tab

 

The Advanced tab for WP Super Cache settings is a very long page.  Next, remember to click “Update Status” before moving on to the …

Mod Rewrite Rules and Expiry Time & Garbage Collections sub-sections

wp-super-cache-advanced3

Mod Rewrite Rules in the Advanced tab.

Then you might have to click the “Update Mode_Rewrite Rules” button when you see this yellow box:

Update-Mod-Rewrite-Rules

Click “Update Mod_Rewrite Rules” button

Under “Expiry Time and Garbage Collection” sub-section, set Cache Timeout to 3600 seconds.

Scheduler Interval: (your selection available might be different from mine which seems to be impacted by my Jetpack plugin. You might have Weekly, Twice Weekly, etc)

Before you move on to the next section on the page, click the “Change Expiration” button.

wp-super-cache-advanced-garbage collection

Click the Change Expiration button

 

Rejected User Agents sub-section

Now, scroll down the page till you get to the “Rejected User Agents” section. Add the text “commentluv” and click “Save UA Strings” button.

wp-super-cache-advanced-rejected user agent

Add “commentluv” to Rejected User Agent sub-section

 

 

WP SUPER CACHE Settings: [CDN]

This one is easy! Just Enable the CDN Support and click the “Save Changes” button.

WP Super Cache Settings for CDN

WP Super Cache Settings for CDN

Leave the defaults as is.

  • Include directories: wp-content,wp-includes
  • Exclude if substring: .php

 

WP SUPER CACHE Settings: [Contents]

Another easy tab – nothing to set here.

 

WP SUPER CACHE Settings: [Preload]

I set the “Refresh preloaded cache files every” to 2880 minutes (2 days). (src: http://wordpress.org/plugins/wp-super-cache/).

Then as per image, and Save Settings.

WP Super Cache settings: Preload

WP Super Cache settings: Preload

For the remaining 2 tabs in WP Super Cache Settings: Plugins & Debug – I didn’t make any changes.  Everything under the “Plugins” tab is disabled. If I find cause to change these settings, I will update this post.

 

Phew!  That was a long one for WP Super Cache Settings wasn’t it?  Hope it was helpful to you.


 

Reference for those who need more: (All links open in a new window)

 

Enjoyed this post?

Easily subscribe to keep get all new postings via email. No We Don't Serve Spam - Ever!

We respect your privacy

Your Comments? Tips to share?