You are here
Home > Latest Posts > How To & Mods > Configuring WP Super Cache for best Caching performance using Mod_rewrite method

Configuring WP Super Cache for best Caching performance using Mod_rewrite method

WP Super Cache is one of most popular Plugins for WordPress sites / blogs and perhaps the most popular caching plugin ever. In case you are facing performance issues with your WordPress blogs or sites and don’t use a caching plugin yet, WP Super Cache may be your best bet to “peace of mind”. In this tutorial we will tell you how to configure Super Cache for best possible performance using the most advanced “Mod_Rewrite” method. While Mod_rewrite is deemed more complex to configure than other two possible options it is simply the best. This is again based on our own experience of using WP Super Cache on our own blogs.

How to Install:

Go to Plugins–>Add New and install WP Super Cache.

Super cache 1

How to Configure:

Activate WP Super Cache after installing. Go to Settings–>WP Super Cache from Dashboard menu.

The first tab is “Easy”. You can just put Caching on and save and it will enable “PHP caching” by default. Here you can see two more options “Test Cache” and “Delete Cache”. Once you configure everything you can test caching by using “Test Cache”.

Super Cache 2

Now go to Advanced tab. Check all the below options as seen in the screenshots below.

  • Cache hits to this website for quick access
  • Use Mod_rewrite to serve cache files
  • Compress pages so they’re served more quickly to visitors
  • Don’t cache page for known users
  • Cache Rebuild
  • Mobile Devices support
  • Extra Homepage checks
  • Only refresh current page when comments made

Super Cache 3

super cache 4

One you have checked all the above options and saved you will get a message to update Mod_Rewrite rules. Click on “Update Mod_Rewrite Rules” options as shown in below screenshot to update the rules that the plugin has created based on above settings.

Super Cache 5

Expiry time and Preload:

As can be seen in the above screenshot you can choose your Expiry time to be anything but we recommend it to be around 3600 sec. Select “Clock”, choose interval as per your comfort and save the settings.

Now go to Preload tab and choose to preload cache by putting a value other than zero in “Refresh preloaded cache files”. We recommend it to be set higher so that Plugin can server super cache files to reduce server load. You can decide how many posts you want to preload. If you have too many posts and have a shared hosting you may like to choose onlt the latest 2000-3000 posts. If you are on VPS / Dedicated server you can load all the posts.

The Preload settings shown in below screenshot work fine and can be used. After saving the settings, click on “Preload Cache now”.

Super Cache 6

Why Preloading Cache doesn’t affect user experience here:

For your information with Preload mode on the  Super Cache files won’t be deleted until the time it refreshes itself, so you may think Users will be shown stale files. If you check settings done above

  • With posting of comment the post cache will be deleted
  • You can delete Home Page Cache after posting a new post
  • If you make changes to any post or page just delete its cache

In this way, with Preloading of cache your server load remains low and at the same time, User gets to see the pages / post the way they are with comments. See below screenshot for the option of “Delete Cache” on every post or page that allows one to delete Cache of individual pages.

Delet cache

Check whether caching is working:

Go to content tab and tap on “Regenerate Cache contents” to see the number of Cached files. In case you want to see the listing of files you need to tap on list files.

Cache content

Do let us know what you think about this tutorial and post any thing that you want to ask in comments below.

NM
NM has more than 10 years of experience of covering Technology and innovations. He loves to review new cool gadgets and writing about Android, Gadgets and general Technology stuff. Other interests include listening to Nu-Metal Hits and Kick-Boxing. Write to him at Email: [email protected]
Top