the ultimate guide to w3 total cache settings

,

The ultimate guide to W3 Total cache settings

There are many performance optimization plugins for WordPress like : WP-Super cache, Hyper Cache, DB-Cache Reloaded Fix etc. But we will discuss only W3 Total cache in detail as it has the deepest possibility of customization. So we will give you W3 Total Cache settings which are the best and optimized for almost all different server setups.

Because of the recent updates like Penguin and Panda , the loading time of websites plays a critical role in a website’s search engine rankings. There are several ways to speed up a website. Caching, database caching, object caching, minifying. The real beauty of W3 Total cache is that it makes it easy to do it all at one place.
So, let’s start the tutorial without wasting much time 😀

W3 Total Cache settings :

the ultimate guide to w3 total cache settings

1.) First of all install W3 Total Cache and activate it.

2.) Now after activation deactivate the Preview mode. To deactivate it , just click “Performance” on the left side of your WordPress dashboard and click “disable” button on the Preview section.

Now we will do the rest of the process step wise.

General Settings

  • Enable Page Cache, use “Disk : Enhanced”. If it’s showing up in your options then you can also select Opcode : Alternative PHP cache as it’s the best.
  • Enable Minify, set it to “manual”. Use “Disk”. If it’s showing up then you can also select Opcode : Alternative PHP cache as it’s the best.
  • Enable Database Caching. Use : “Disk”. If your wp-config is not writable due to some security plugin then set it to writable for optimal working of Database Cache.
  • Enable Object Caching. Use : “Disk”. It’s great for sites with heavy traffic.
  • Enable Browser Cache. It helps in leveraging browser caching.
  • Enable Verify rewrite rules, and if you have a Google Page speed API, then it’s your choice to enable Dashboard Widget.

Optionally you can enable “Optimize disk enhanced page and minify disk caching for NFS“. It helps on some shared hosting setups.

Advanced settings

W3 Total Cache settings For Page Cache

  • Enable Cache front page.
  • Enable Cache feeds: site, categories, tags, comments.
  • Enable Cache SSL (https) requests.
  • Enable Cache requests only for www.yoursitename.com host name.
  • Enable Don’t cache pages for logged in users.

For Cache Preload

  • Enable Automatically prime the page cache. Set update interval as 907 seconds or something close. Select number of pages 15 (increase or decrease depending on hosting).
  • Enter your sitemap URL. And enable Prime post cache on publish.

For Advanced

  • Set Maximum lifetime of cache objects: 180060 seconds.
  • Set Garbage collection interval: 3600 seconds.

W3 Total cache settings for Browser cache

  • Enable set Last-Modified header, set expires header, set cache control header, set W3 Total Cache header and enable HTTP (gzip) compression.
  • Set all the cache control policies to : Cache with Max-age.

For CSS & JS

  • Set expires header lifetime : 31536000 seconds (over 1 year).
  • Enable set Last-Modified header, set expires header, set cache control header, set W3 Total Cache header and enable HTTP (gzip) compression.

For HTML & XML

  • Set expires header lifetime : 7200 seconds.
  • Enable set Last-Modified header, set expires header, set cache control header, set W3 Total Cache header and enable HTTP (gzip) compression.

For Media and other files

  • Set expires header lifetime : 31536000 seconds.
  • Enable set Last-Modified header, set expires header, set cache control header, set W3 Total Cache header and enable HTTP (gzip) compression.

 W3 Total Cache settings for Minify.

  • Enable rewrite URL structure and disable minify for logged in users. Set error notification to Admin notification.

For HTML & XML

  • Tick on enable, inline CSS minification, inline JS minification and line break removal.

For CSS

  • Tick enable, preserved comment removal and line break removal. Now go to your website in some other browser and right click and view source. Find the CSS files, and add their urls one by one in the CSS minification box. Do this to see whether something breaks the layout on minification or not.

For Advanced

  • Update external files every : 216000 seconds and same for garbage collection.

For JS

This is the most difficult part of setting up W3 total cache settings. It requires some trial and error. Do it if the above steps were not enough.

  • Tick on enable, preserved comment removal and line break removal. Now got to the source of your site as before and find only those js files which are hosted on your website. Now add their urls one by one and check every time whether something is breaking your site or not.
  • NOTE : Customscript.js and the themes js files like themename.js should not be minified as mostly they are the ones which cause errors.

W3 Total Cache settings for User agent groups.

Just enable it and don’t change anything.

NOTE : If any setting is not there in this guide then leave it to the default value.

Checking the cache

1.) Open any other browser and clear its cache and then open your homepage URL. Now right click and click on “View Page Source” and at the bottom, it should look like the screenshot below

w3 total cache settings check

2.) Go to tools.pingdom and check your site load time. If everything is working well. You can expect results like below.

w3 total cache settings test

If the Optimal Settings do not work for you. Follow these steps :

1.) You can try WP-Super cache. And learn to customize it here. Using it along with DB-Cache reloaded fix will give you nice results. But not better.

2.) Disable Gzip compression and see if it works well.

3.) You can comment below so that I can help you in fixing errors.

If you have any problem in the above guide or have any doubts, then do comment. I will be more than happy to help. 😀
Genuine views are also welcome.

Updated settings for different scenarios and custom W3 Total Cache configurations: 

  • For people on shared hosting servers: Enable only Page caching, browser caching and database caching for best results. Use “Disk enhanced” method for best speeds. In database caching set the time to 301 seconds or something around 5 minutes. If your shared hosting is too poor or you are using a free server then only use the browser caching module with the page caching module as it makes the objects static instead of dynamic php code execution on every page hit.
  • Try and use Cloudflare CDN or Pagespeed CDN alongwith the W3 Total cache plugin in order to have the best loading time.

Here’s a short video by Cloudflare on how to setup their service perfectly in a hassle free manner. 

By watching the above short tutorial video you can get a better idea on how to adjust cloudflare best settings, adjust complicated things like performance, security and page rules for defining what you want cached and what not. For people who run into any problems they can always comment here or they can share their problems on the Cloudflare forum here.

  • Try and optimize cron jobs manually to reduce server usage and you can also try to disable the WordPress heartbeat API in order to reduce CPU usage. Disabling automatic cron can go a long way in improving the overall performance of your server and save you unnecessary load.
  • W3 Total Cache miscellaneous settings: Enabling the “Edge mode” in the latest variant of W3 Total Cache can give a minor speed boost to some server setups. But be warned as it’s know to break some server configurations, so always try it at your own risk.
  • W3 Total Cache extensions: W3 Total cache plugin now comes with extensions in order to improve upon the existing functionality. For those people using the WordPress SEO by Yoast plugin, they can enable the Yoast SEO extension. Those people looking for implementing Cloudflare on their sites need to install the Cloudflare extension for communication between Cloudflare and the caching plugin. Installing the Feedburner extension allows you to ping Feedburner automatically every time you publish a new post. There’s also the extension for Genesis Framework, but it requires W3 Total Cache pro along with Genesis Framework installed on the site. This module improves the page generation time by 30%-60% for the Genesis Framework by implementing Fragment caching method which is available with W3 Total Cache pro.

We also provide website speed optimization service through our website Cacheable. Those interested in getting their sites manually tweaked for best performance, or those who want help in configuring w3 total cache settings can visit the site and contact us via email for the speed packages.
Otherwise following this guide well and having a good server can easily get you around the 1-2 seconds loading time mark.

Stay inspired to rise.
Inspire2rise on Facebook | Inspire2rise on twitter
All rights reserved. 2011-14 ©Inspire2rise.com

Summary
The ultimate guide to W3 Total cache settings | Inspire2rise
Article Name
The ultimate guide to W3 Total cache settings | Inspire2rise
Description
We will discuss W3 Total cache in detail as it has the deepest possibility of customization.So we will give you W3 Total Cache settings which are the best.
Author

What do you think?

0 points
Upvote Downvote

Total votes: 0

Upvotes: 0

Upvotes percentage: 0.000000%

Downvotes: 0

Downvotes percentage: 0.000000%

Written by Aditya Nath Jha

Aditya Nath Jha is an Engineer from New Delhi, India. His areas of interest include Gadgets, WordPress, speed optimization & latest technology.
When he is not busy blogging he loves to write poetry, compose his own songs and has a taste for music! Find me on Facebook, Google +, Twitter, Linked in.
And watch my videos on Youtube.

Comments

Leave a Reply
  1. Hi,
    Thank you for the great post Aditya. W3 Total Cache works for one of my site very good. I would like to use this for a BBPress Forum site also, where all pages (forum pages, blog pages, normal wp pages) are only visible for logged in users. My question is: when I want to show the cached (speedy) pages to my visitors, may I disable this option under Page Cache?:
    • Don’t cache pages for logged in users
    Unauthenticated users may view a cached version of the last authenticated user’s view of a given page. Disabling this option is not recommended.

    Is that mean, for example, that a visitor, who is not logged in, will see the given page, which is allowed only to see for logged in users?
    Is that mean, it makes no sense to use W3Total Cache for a site, where all the content is only for logged in users? Or is there a settings, to solve that problem?

    Thank you very much

    • In the above case it would be true that W3 Total Cache’s static caching methods won’t work great. But things like Database Caching, Object caching and minifying resources would still do a great degree of help in such cases. And you should also consider the fact that though you can’t cache all of the content after a degree of authentication is required you can still have the static resources like images, fonts, icons cached if you use any good CDN or even free CDN like Cloudflare. The key to maintain scalability in such a site would be to have optimized code in terms of the overall template, server setup and a lot of other things. Do comment if you still have any doubt left Agnes! 🙂

  2. Until reading your article, W3 Total Cache was a great unknown for me, but now I slowly start to understand what is all about.
    Now I start to understand why Google sent me so many messages to minify my images, check the load time and so on, some of them were related with W3 Total Cache.

  3. Hi, this is a great tutorial and it helps me a lot to configure the settings. But on the part of database and object caching, you must put a warning for those using shared hosting account that it is best NOT to enable it. It made my website temporary restricted due to high I/O resources. Wanted to share this to others to avoid issue I encountered in hostgator.

    • You must not enable object caching on shared hosting while database caching can help in some instances! But yeah this is a warning that should go out clear to everyone who has their websites on shared hosting using W3 total cache plugin.

  4. I forgot to ask what is the diferrence of not enabling the “Set entity tag (eTag)” in perfomance tab where in some tutorials they make it enable?

    • It makes a lot of difference because if you have not set far future expires header then only you need to set up Entity tags. Not using Entity tags and in it’s place setting browser cache to over 1 year of expiration date makes for a best performance practice.
      If you have any more doubts do let me know! 🙂

  5. I use Wp Rocket for my websites also i use total cache on my other websites. They have same result but for those who owns website there if you want a fast loading website always optimized your images . Dont depend to much cache plugins 🙂

  6. WordPress core doesn’t perform well on its own. To improve its performance we can add caching rules on various elements of the website and at the server level.
    The most easiest way to add caching to WordPress is by using caching plugins, and one of the most popular is W3 Total Cache.
    W3TC has a lot of settings, each with its own benefits. For a quick guide on W3TC setup, refer to this guide!

  7. Hi Dear, I am using w3tc on my vps which is on a really slow server. After installing W3TC my home page content did not update. As I daily update new content. Please help!

    • Slow pages are generally ranked lower in Google SERPS, so clearing cache a lot of times does have a negative effect on site speed but not so much as to decrease your SERPS on a permanent basis. Or you can look for another caching plugin like WP Super Cache or Wp-Rocket which have the option to preload page cache.

  8. Hello Aditya! Really thanks for your reply. Can you please tell me that using W3TC would hurt my keyword rankings in google serp or not?

  9. Your auto is super, I get this error : “It appears Minify URL rewriting is not working. Please verify that the server configuration allows .htaccess
    Unfortunately minification will not function without custom rewrite rules. Please ask your server administrator for assistance. Also refer to the install page for the rules for your server.” do you understand why ?
    Thank you

  10. Many many Thanks Aditya for telling W3 Total Cache Plugin. Just i have downloaded this plugins and installed in WP. and it working.

  11. Thanks for writing this tutorial on how to setup and decrease a blog load time using W3 total cache.

    I use this same plugin on one of my blogs, the resulting speed of the blog is awesome.

    Although thbhacking dot com I have seen many people complain about this plugin that it sometimes conflict with other wordpress plugins.

    I don’t know if you have experienced this in person?

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading…

Facebook Comments

Google Nexus 7 2013 Review and new features

Google Nexus 7 2013 Review and New features

Ultimate guide to typography for websites and blogs

Ultimate guide to typography for websites and blogs