A cache plugin serves static contents to the visitor, which improves page load speed. There are so many cache plugins available in the WordPress plugin directory. WP Super Cache plugin is the best option for beginners. This plugin is developed by the team Automattic.
This plugin stores cached pages in the memory. When a user makes a request, the pages are delivered from the cache; here in this guide, you will learn about the best settings for the WP Super Cache plugin to speed up your WordPress site.
How to install WP Super Cache?
- Log in to the WordPress Admin area of your blog.
- Then Click plugins from the left-hand side navigation.
- Click Add new and search for “WP Super Cache” in the search bar on the right-hand side of the screen.
- Now Click on Install Now
WP Super Cache Settings
To configure this plugin go to Dashboard > Settings >> WP Super Cache
Easy
Caching on (Recommended)
Advanced
Caching
- Enable Caching.
Cache Delivery Method
- Simple (Recommended)
Miscellaneous
- Don’t cache pages for known users. (Recommended)
- Compress pages, so they’re served more quickly to visitors. (Recommended)
- Cache rebuild. Serve a supercache file to anonymous users while a new file is being generated. (Recommended)
- 304 Not Modified browser caching. Indicate when a page has not been modified since last requested. (Recommended)
Advanced
- Mobile device support. (External plugin or theme required. See the FAQ for further details.)
- Clear all cache files when a post or page is published or updated.
- Only refresh the current page when comments made.
- List the newest cached pages on this page.
Expiry Time & Garbage Collection
- Cache Timeout: 0 seconds
- Clock: 00:00 HH:MM
- Interval: Once Daily
No need to make any changes in CDN, Contents, Preloads, Plugin sections.
So this is all about WP Super cache; use these settings to get better performance. Also, check the essential plugins for WordPress blogs.
Sir,
My host asked me to set the SSL to flexible from full, it solved the two cache-control problem.
I have few more questions.
1) I use newspaper plugin along with mobile theme, what cache control and other settings should I add in .htaccess for it to work with wp super cache and Cloudflare?
2) Also, what settings should I apply in cloudflare.. Like Caching Level(No query string, Ignore query string, Standard)? Browser Cache TTL? and page rules?
Thank you in advance.
Hello Tinu,
1. Go to WP Super cache settings Advanced >> and enable Mobile device support. This will help the mobile theme to work correctly on mobile devices.
2. For the Newspaper theme, we have dedicated content to optimize Newspaper theme pagespeed.
Hope you’ll find this helpful.
Hello Sir,
I am using newspaper theme and tagDiv Mobile Theme also. I have set caching using WP Super Cache and I have set all caching settings according to the guide – > https://forum.tagdiv.com/cache-plugin-install-and-configure/ . By the way, I am using Cloudflare and I have also set Cloudflare settings according to the guide -> https://forum.tagdiv.com/cloudflare-cdn/
I also set Browser cache TTL to 1 month in Cloudflare
Apart from that I have added the following 3 page rules in Cloudflare
https://www.MyDomain.com/wp-admin*
Security Level: High, Cache Level: Bypass, Disable Apps, Disable Performance
https://www.MyDomain.com/wp-login.php*
Security Level: I’m Under Attack, Cache Level: Bypass, Disable Apps, Disable Performance
https://www.MyDomain.com/*
Cache Level: Cache Everything, Origin Cache Control: On
I have also set cache control header in .htaccess . Below is the code
# BEGIN Caching
Header set Cache-Control “max-age=2592000, public”
Header set Cache-Control “max-age=604800, public”
Header set Cache-Control “max-age=216000, private”
Header set Cache-Control “max-age=216000, public, must-revalidate”
Header set Cache-Control “max-age=1, private, must-revalidate”
# END Caching
My response header for jpeg file is as below:
accept-ranges: bytes
cache-control: max-age=2592000, public
cache-control: no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0
cf-cache-status: BYPASS
cf-ray: 54988bd04b09c91c-HYD
content-length: 104228
content-type: image/jpeg
date: Mon, 23 Dec 2019 07:15:46 GMT
expect-ct: max-age=604800, report-uri=”https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
last-modified: Sun, 22 Dec 2019 07:58:16 GMT
server: cloudflare
status: 200
vary: Accept-Encoding
I have checked with my host and they have replied saying –
We checked the website and it’s currently using CloudFlare service for DNS and caching. Also, the header reply for client’s site is also returned by CloudFlare server. What we can advise for this case is to correctly configure WordPress website for using CloudFlare for the headers to be correct.
Somehow Cloudflare’s CDN is not caching images and other files(cf-cache-status: BYPASS). Am I missing something here?
Thank you.
Hello Tinu,
Please remove this code from your site’s htaccess file
# BEGIN Caching
Header set Cache-Control “max-age=2592000, public”
Header set Cache-Control “max-age=604800, public”
Header set Cache-Control “max-age=216000, private”
Header set Cache-Control “max-age=216000, public, must-revalidate”
Header set Cache-Control “max-age=1, private, must-revalidate”
# END Caching
Hope you will find this helpful.
Great website… I loved this this concept… The people those who are actually interested to know technical things and enhance their knowledge they have to go through this website… The name of the website and creative idea behind is just excellent…Very easy to use and very easy to access… Thank you.