How to Configure W3 Total Cache Cloudflare Settings For Best Result

How to Configure W3 Total Cache Cloudflare Settings For Best Result

  • 12
    Shares

Are you using the W3 Total Cache Cloudflare settings to make your WordPress site load faster? If yes, then this is an excellent choice to boost your website speed with optimized Total Cache settings.

Previously, I have mentioned that to build a really fast website optimizing your server response performance is really necessary. And the next essential step to build a faster website is configuring a caching plugin. Using caching plugin is very necessary to increase the site performance because it covers a majority of requirements to optimize a site. The combination of a reliable & fast hosting, a good caching plugin plus CDN can result in a stunning website performance.

For example, Cloudways Hosting + W3 total cache + Cloudflare is a great combination to get a suitable site performance. I use the W3 total cache Cloudflare settings in conjunction with Cloudways hosting, which is currently  #the most rated web hosting among the managed web hosting service providers.

[bctt tweet=”Your blog can suffer from degraded performances if you do not use a cache- management plugin, like W3 Total Cache.” username=”Rupam2234″]

Let’s start the process of w3 total cache Cloudflare configuration for your WordPress site

Most of the settings in the W3 total cache is preconfigured, but still, there is some space that you should have to go through and configure according to your need. And of course, these configurations will impact on the final result. Here I will go through the most important Performance Tab of w3 total cache plugin and externally I will help you to setup Cloudflare with the total cache to boost up the performance even more.

Heads up! Use the Generate-press WordPress themes to get a better result in terms of both SEO and Site Performance. 30% off with my coupon or ask them for one month trial.

Now let’s start with the Pingdom test tool. (this was a result of my homepage after using this configuration). You will also get this kind of result but first, test your website with this great tool and know about your current status. If you find something similar to this then power to you that you have already an optimized website. But if not follow the steps below one by one carefully.

cloudflare-test
cloudflare-test

The grade and score by this tool may be different for the different page of your website. This depends on the number of images, external javascript and other external stuff present on that page. Anyway go ahead and traverse through different pages of your website and see typically how fast they load.

Whenever your test is complete and you have found a few problems with your site, follow the steps below as stated.



General w3 total cache settings

Inside the admin dashboard, you will find the general settings under total cache plugin. If you need more information just see the image below.

General w3 total cache settings
General w3 total cache settings

And when the general setting dashboard appears,  apply these configurations appropriately.

general-settings-total-cache
general-settings-total-cache

Next step:

general-settings-total-cache-2
general-settings-total-cache-2

Next step:

general-settings-total-cache-3
general-settings-total-cache-3

Again:

general-settings-total-cache-4
general-settings-total-cache-4

And the last step:

general-settings-total-cache-5
general-settings-total-cache-5

Also, configure the settings for google page speed insight inside your total cache dashboard using API. You can find the step by step instructions in your W3 total cache dashboard. The result will be displayed like this.

Google-Page-Speed-WordPress-Dashboard
Google-Page-Speed-WordPress-Dashboard

Now it’s time to optimize your webpage caches by applying w3 total cache Cloudflare duo configuration.



Page cache

page_cache_1
page_cache_1
page_cache_2
page_cache_2
page_cache_3
page_cache_3

Remember that enabling the compatibility mode is highly recommended by the plugin developer as it optimizes the interoperability of caching. Enabling this can reduce the loading speed a little but ensure that there will be less likely to have any problems with your site.

Minifying configuration

Minifying configuration is already configured according to the developer. Database and object cache are also properly preset. You can find this information in the install tab.  If you are using Cloudflare minification then make sure minification is turned off in total cache setting as Cloudflare minification can take care of this.

W3-Total-Cache-Install-Tab-1
W3-Total-Cache-Install-Tab-1

Database cache and Object cache

Leave it as default.

 

Browser cache

browser_cache_1
browser_cache_1
browser-cache_2
browser-cache_2
browser-cache-3-w3 total cache cloudflare
browser-cache_3

Don’t make any changes to those settings which developer has mentioned as preset. Including the expire header and its lifetime.

Configure W3 Total Cache Cloudflare CDN

CDN is a very important term for your website. Without a CDN, you will only have one origin server for your website which can or can’t be very far away for people. But if the server is far away from your visitors they will experience a bad loading time. So establishing a CDN for your WordPress site is a really important task.

You have options available to configure a CDN in w3 total cache setting. Here’s how to configure it properly. For this example, I will use Cloudflare CDN as it is free to use and accessible to everyone.

Inside the settings, tab enables the CDN option and later put the name of CDN you will use. (Cloudflare)

configure-w3 total cache cloudflare
configure-w3-total-cache-cloudflare

Extensions

W3-Total-Cache-cloudflare-Extensions
W3-Total-Cache-Extensions

Inside the extension tab of W3 total cache, you can enable the configuration any feature you like to use. So to use Cloudflare you need to enable it.

W3-Total-Cache-CloudFlare-Activation
W3-Total-Cache-CloudFlare-Activation

After activating the Cloudflare option click on the settings below it and it will lead you to a new dashboard to configure the settings properly.

cloudflare_stings
cloudflare_stings
cloudflare_stings
cloudflare_sting

Caching level

You can use any of the given settings according to the requirement to your website. But most of the user normally use the aggressive caching including myself.

Hotlink protection

This helps you to protect your images from spam sites. Whenever someone uses your images directly with the image link then it increases the server load on your hosting. So to save the CPU uses hotlink protection must be enabled. You can enable it from your Cpanel too.

Always try to check your incoming external links in google search console to make sure your site is not having a load of spam links. Remember that more SEO backlinks you get, the higher rank you will achieve.

When you have correctly configured everything inside the total cache setting,  now you need to go to your Cloudflare dashboard. If you don’t have a Cloudflare account, create one here.

After signing up you will have a new window where you have to put your website address to scan by Cloudflare. Like the image below,

w3_total_cache_cloudflare
w3_total_cache_cloudflare

After typing your site address click on add site and scroll down the rubbish list and click on continue.

Then choose free Cloudflare package and continue. At this stage, Cloudflare will provide two name server (NS record)  which you have to put into your hosting DNS record instead of your current name servers. Don’t afraid as changing your name server with Cloudflare ND records won’t create any problem to your website visibility.

Cloudflare-Missing-Records
Cloudflare-Missing-Records
Cloudflare-Missing-Record
Cloudflare-Missing-Record

If you find it difficult to configure the DNS record search in Google Search as [ your hosting name+ DNS record configuration ]

You will find the way to fix it easily.

Now after confirming your DNS records go to the Cloudflare site speed dashboard and follow the settings as in the image below.

Cloudflare-Speed-Settings
Cloudflare-Speed-Settings

Page Rule settings

Now go to your page rule configuration.

And follow the settings below according to the images, to create a good page rule.

page-rule-settings
page-rule-settings

 

 

page-rule-settings
page-rule-settings

Now when you are done with the page rule go to your WordPress admin dashboard and clear your all cache. ( purge all  caches)

Some Issues With W3 total cache

The website is not appearing: Disable the minify option to fix this.

Slower load time compared to previous load time: Disable the object cache and sometimes wait for till next pagination.

The website crashed: Open your WP-config file and remove these codes.

/** Enable W3 Total Cache */
define('WP_CACHE', true); // Added by W3 Total Cache

Also, remove the lines of your .htaccess file between

# BEGIN W3TC ...
# END W3TC

Don’t forget to include these two lines too.

If that still not fix the site crash issue then,

delete: advanced-cache.php, objectcache.php, and db.php from wp-content. Also, delete the w3-total-cache folder in wp-content/plugins.

Conclusion: using these settings you can easily get a suitable site performance and save lots of extra CPU uses.  So try to configure the settings properly and everytime check the website while changing anything.  If it goes wrong then rollback the settings and thus get the proper setting for your website.

Remember, to get something really good you need to perform some experiments yourself.  Yet,  I hope this guide will definitely help you figure out the things how to configure w3 total cache Cloudflare settings properly.

Don't miss out!
Subscribe To Newsletter

You will be notified with email when we publish editorial articles in this blog 

Invalid email address
Give it a try. You can unsubscribe at any time.

  • 12
    Shares

Rupam Krishna Bharali

Rupam is the founder of www.rankwordpress.in. He is a web developer, blogger, graphic designer and an MCA student from Dibrugarh University. He also loves traveling, exploring new ideas and connecting with people. Let's connect on: twitter

This Post Has 6 Comments

  1. Hi, after I’ve done all of this, should all of my traffic be cached? It looks, on average, that only one third of my traffic is being cached.

    1. Hi Debbie,

      This is not always recommended that all the traffic should go under caching. This depends on what type of environment the user have. An outdated browser, restricted protocol can make some difference. But After using these settings most of the user should be cached.

      Can I know how you have determined the average cached traffic?

  2. Does your site have a contact page? I’m having a tough time locating it but,
    I’d like to send you an email. I’ve got some suggestions for your blog you might be interested in hearing.
    Either way, great site and I look forward to seeing it grow over time.

    1. Hi, sorry for unavailability of the contact page.

      Actually I do have a contact page but forget to add the links to public.
      The link is https://www.rankwordpress.in/contact-me/

      (I will update these links in footer section)

      I really appreciate your information about the mistake. Thank you.
      Looking forward to receive your email.

  3. Thanks for the wonderful post, I have implement all the settings now when I run a test in gtmetrix i get a result that says serve resources from consistent URL. Would you be so kind to please help me out with this error… I have tried disabling the addins, yet no go please help.
    URL: https://fatlossplanner.com

    1. Hemant, I have tested your website.

      serve the resource from consistent URL appears when the same resource is used under two different sub-directory of one domain. Sometimes, the issue can also be caused by two or more plugins, using the same external libraries or resources. In other cases, it is a result of incorrectly implemented redirects.

      But in your case, if you are using one adsense ad twice in a page then this problem can arise. Consider using different ads inside your sidebar and page. It should be solved.

Leave a Reply

Close Menu