w3-total-cache optimal settings

Configuring W3 Total Cache – General Settings

 

W3 Total Cache creates a new menu entry called Performance in WordPress dashboard. The options that we’re looking for are under Performance > General. You’ll notice that this page has an overwhelming number of settings for a caching plugin (and a whole lot more if you’re into advanced stuff). Each setting is placed inside a box – called modules. I’ve discussed each of these modules with relevant screenshots. If you get stuck or are uncertain about a particular setting, simply follow the screenshots.

W3 total cache general settings module

The first module you’ll find is General. I’d recommend not to enable the all the caching options using the toggle checkbox. You might turn on settings that aren’t required (or even supported by) your host – which would inadvertently slow down your website. However, if you want to quickly disable all the modules, this toggle checkbox comes in handy! Before we proceed further, if you’re unfamiliar with the terms ‘page cache’ or ‘database cache’, I would recommend readingHow WordPress Caching Works.

Page Cache Module

W3 total cache page cache

The second module we’re going to configure is Page Cache. The Page cache method depends on your hosting environment. If you’re using a shared host, Disk: Enhanced is the best option. However, if you’re using a dedicated or virtual server and you have APC (or any other form of Opcode caching installed), you should select the respective option.

Minify Module

W3 total cache minify module

The Minify module compresses the CSS and JavaScript files your theme uses, by removing unnecessary lines of code like comments and whitespaces. This reduces the filesize by ~10% which results in a faster site. Under Minify cache method you should select the appropriate option based on your server.

Other Caching Modules

W3 total cache object cache

The next two modules are Database Cache and Object Cache. Enable each of them and change their caching method to the one best fit to your hosting environment – just like you did underPage Cache and Minify.

W3 total cache browser cache

The last module that we want to enable is Browser Cache. Once you’ve enabled them, click onSave all Settings. That should do it! W3 Total Cache is now enabled in your server. We will now take an in-depth look into two specific modules – Page Cache and Browser Cache. The rest of the modules’ default values are just fine.

Page Cache Settings

w3 total cache advanced settings - page cache

The Page Cache settings can be found under Performance > Page Cache. The settings here are fairly self explanatory. I’ve enabled a couple of them – specially Don’t cache pages for the following user roles. This ensures that when an author is editing a post, he/she will able to view the latest version and not the one from the cache.

Preloading the Cache

 

seconds
The number of seconds to wait before creating another set of cached pages.

Limit the number of pages to create per batch. Fewer pages may be better for under-powered servers.

A compliant sitemap can be used to specify the pages to maintain in the primed cache. Pages will be cached according to the priorities specified in the XML file. Due to its completeness and integrations, WordPress SEO is recommended for use with this feature.

By default, W3 Total Cache caches a page when it is first requested. You also have the option to pre-generate copies of all the posts/pages. This way, regardless of when a visitor requests a page, the cache is ready and the page is served in the lowest possible time.

You should configure the cache preload settings based on your hosting environment and the amount of traffic your website receives.

  • The cache Update interval directly affects server resources – lower the time interval (i.e. higher the frequency), greater the server resource consumed. People on shared hosting servers should be very careful with this setting. Set a high enough frequency and you might just get your account suspended for abuse of server resources. A safe cache preload interval is one hour – i.e. 3600 seconds.
  • If you’re unfamiliar with the Sitemap URL, install Google XML Sitemaps. It’s super easy to use and is in fact, a must-have plugin.
  • Finally, you want to enable the last option which will trigger a cache preload operation when a post/page is published.

Browser Cache Settings

w3 total cache advanced settings - browser cache

Click to rate this post!
[Total: 1 Average: 5]