WP Super Cache Settings for Optimal Performance

Step #3 Garbage Collection

Now we need to schedule the garbage collection. Basically It takes out the trash or old static files and replaces them with fresh static files. The fist line with the time and date in it will give you your server time and date. If this number does not read the same as on your computer you can change it it in general settings in WordPress.

setting time zone in wordpress

By looking at the second line you can see when the next garbage collection is scheduled. You can see and example of this below. In the garbage collection settings you can disable a cache time out by entering a “0”. Since you are here you probably just need to imitate what we have set up.

As a starting point for mod_rewrite it is recommended that you set the timer to 3600 seconds for stale cached files. Basically when a visitor loads that page and the program sees that that page is old and expired it will generate a new fresh page for your visitor. You could also use the clock to check for stale cached files so that it check it the time of day that you want it too. This would be helpful if you have a very large site and you set this to a time of day when you have the least visitors. You can slow choose to have garbage collection done once a day, twice a day, weekly, monthly or even hourly.

Only cool people share!

One thing that you can do is have your server email you when garbage collection runs. This get’s irritating after a while but you may want to enable it to make sure that it is working. You can always come back and disable it late. It will operate off of the email address that you have in your general settings.

Expiry Time & Garbage Collection

UTC time is 2014-09-06 16:29:09  Local time is 2014-09-06 12:29:09

Next scheduled garbage collection will be at 2014-09-06 17:29:09 UTC

seconds
How long should cached pages remain fresh? Set to 0 to disable garbage collection. A good starting point is 3600 seconds.
Scheduler
seconds
Check for stale cached files every interval seconds.
HH:MM
Check for stale cached files at this time (UTC) or starting at this time every interval below.
Email me when the garbage collection runs.

 

Do not forget to click “change expiration” when you are done! 🙂change expiration

Step #4 Accepted Filenames & Rejected URIs

Lets say that you have set your garbage collection for 1 week but you update your featured page every day? Well you would not want to cache it because you want the freshest dynamic content on that web page. This is where you would choose NOT to cache certain files. Just leave them all unchecked if you are not sure. 😉

Do not cache the following page types. See the Conditional Tags documentation for a complete discussion on each type.










String Explanation in WP Super Cache

For this next section it is important that you understand the difference of s string from a filename. Below you will see a string from A1WEBSITEPRO.COM.  This string leads to a file name ultimately. The string is highlighted in yellow and the file name is highlighted in light blue.

https://a1websitepro.com/wp-content/uploads/2014/01/website-speed-test-637×372.jpg

Below you will see a box and in it you will see “wp-*\.php”. What this is saying to the WP Super Cache plugin is NOT to cache anything that has “wp-” in a string that ends in .php. It is also telling the program not to cache any string that has the term “index” within it that ends in .php. So that means that any files that are in these strings will NOT be cached!

wp super cache sting not file names

 

Diving a little deeper into this. Lets say that we made a post and we gave it the category “Super Cache” but we also gave it a category of “Fast Website Methods”. Lets say that we entered /super-cache/ “this would be the slug or string to that category. Although the plugin would not cache the Super Cache sting it would cache /fast-website-methods/ thereby caching your post into one category but not the other.

Rejected User Agent String Settings

Ok so now you know that when people are coming to your site and accessing different pages and strings those pages are cached as they surf. Now what about a bot that is coming to your website and accessing everything on your website within a relatively short period of time. What is the problem with this? They create too big of a cache file. You can tell WP Super Cache NOT to cache pages caused by the bots. For example if you have an events calendar on your website that goes back forever and forward forever these bots will try to cache every page causing a bloated cache file.

rejected user agent strings

 

Lock Down

This is something that you will probably not have to worry about that much but what it does is lock’s down your website if you are getting too much traffic.

lock down

 

Directly Cached Files

Ok so lets say that you are going to be featured by a large website or magazine and they are going to send a bazillion people to your web page in one day. Put that url in this white box before that day and click the submit button. Now you will be ready for visitors to blast that page. directly cached files

 

Fix Configuration

If you get totally lost or mess something up then you can restore the default configuration by clicking the button.

fix configuration

WP Super Cache Settings for Optimal Performance was last modified: November 18th, 2020 by Maximus Mccullough

Pages:Previous 1 2 3 4 5 Next

1 Trackback

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.