Make your WordPress website faster with w3 total cache and Cloudflare. If your web hosting server speed is not faster and you’re facing a server speed problem in google page speed test. You need to use w3 total cache and Cloudflare to improve your website page loading speed and a great protection from Ddos attack.
W3 Total Cache and CloudFlare
is a content delivery network (CDN) website which provides a free and paid plan and also it provides a public SSL certificate in the free plan. CloudFlare is a powerful CDN to speed up your website.
W3 Total Cache Configure Setting
First of all, You need to install w3 total cache on your WordPress. Get started by installing and activating the plugin. It’s a free plugin available in the WordPress directory, so you can install and activate from you are WordPress dashboard by going Plugin > Add New and search w3 total cache
go to w3 total cache plugin general option. The first option allows you to automatically enable every feature. But, you won’t need every single feature, so you should not use this option. Don’t tick mark Toggle all caching types on or of and also don’t click Enable Preview Mode option.
2. Page Cache ( Enable):
Page Cache is an important option of w3 total cache plugin. you need to enable this option and for the Page Cache Method, you also need to choose Disk: Enhanced.
3. Minify (DISABLE):
You don’t need to enable minify option with the w3 total cache because CloudFlare also supports minification. So I will recommend using CloudFlare to minify your website code instead of this plugin. Therefore, you don’t need to enable this option if you want to use CloudFlare.
4. Database Cache (DISABLE):
If you are using a shared hosting package then you don’t need this option because shared hosting server database actually can slow down due to overload on a CPU. So, I recommend Disable this option.
5. Object Cache (ENABLE): Enable
object cache option and select Disk Method.
6. Browser Cache (ENABLE):
The browser cache increases your website speed by using static resources in your visitor’s used browsers. Therefore you need to Enable browser cache option.
7. CDN (DISABLE):
Leave CDN option to disable because you can not handle CloudFlare from here. This option used for paid CDN like MaxCDN. Don’t worry I will show you how we can handle CloudFlare from w3 total cache actually we use CloudFlare Extension from this plugin.
8. Reverse Proxy (DISABLE):
Reverse Proxies are an advanced concept which generally used for a private hosting. Therefore you leave this option Disabled.
9. Monitoring (NO ACTION):
There is is no need for monitoring your website. Ignore it.
10. Debug ( DISABLED):
Don’t enable any option from there.
Page Cache Configure Setting
1. General :
- front page (tick mark)
- Cache feeds (tick mark)
- Cache SSL – CloudFlare offers free SSL certificates, so you can enable this box. ( only tick mark if you want to use Cloudflare public SSL certificate)
- Don’t cache pages for logged in users (tick mark)
everything leaves default which not mentioned above.
2. Cache Preload:
Fill up this section with the following setting.
Automatically prime the page cache: (tick mark)
- Update interval: 900 seconds
- Pages per interval: 10
- Sitemap URL: this option is for your website sitemap.
- Preload the post cache upon publish events: (tick mark)
Other options leave default.
Step 3: Object Cache Configure Setting
You should leave everything as the default. Just you need to make sure these options contain following numbers.
- Default lifetime of cache objects: 180 seconds
- Garbage collection interval: 3600 seconds
Step 4: Browser Cache Configure Setting
The browser Cache configures setting is the last option of w3 total cache configures the setting.
1. General :
Under the general section, you need to tick mark some additional option and make sure all of these following boxes are checked.
- Last-Modified header: Checked
- expires header: Checked
- cache control header: Checked
- entity tag (eTag): Checked
- W3 Total Cache header: Checked
- Enable HTTP (gzip) compression: Checked
Leave all of the other options under Browser Cache as their defaults.
Step: 5 W3 Total Cache Configure Setting With CloudFlare Extension :
Now, It is the time to activate w3 total cache and CloudFlare on your website. Therefore, go to w3 total cache extensions option and activate CloudFlare. After activating CloudFlare extension you are ready to move CloudFlare configure the setting.
How To Setup and Configure CloudFlare For WordPress
First of all, you need CloudFlare account which provides us a global API key which will be used to activate Cloudflare with w3 total cache. Therefore, you need Cloudflare account. If you don’t have any account on CloudFlare. then simply go to CloudFlare website and activate your website with CloudFlare DNS.
After making your CloudFlare account, you need to copy your Global API Key. Come to w3 total cache extensions option click on setting under the CloudFlare extension. Then Click the Authorize button under the Credentials. Now, Click on API Key View button and enter your CloudFlare API key. Now you will see your CloudFlare account has activated with the w3 total cache.
Step: 6 Turn on CloudFlare Minify
Finally, we minify our website code by using CloudFlare.Please, Scroll down CloudFlare setting page then you will see an option off CloudFlare: Content Processing. Enable given three options.
Minify CSS files.
I know that was a lot. But once you do this process once, you should be done with it forever! That means an hour or so of pain will set you up for a lifetime of improved page load times. let us know if you find any difficulty by commenting below