Configuring W3 Total Cache, W3TC, for Optimum Performance with Disk Cache for Shared Hosting – Optimizing WordPress

WordPress LogoIn this article I will be explaining how to configure W3 Total Cache, hereafter referred to as ‘W3TC’, to cache your site and to serve that cache statically via mod_rewrite for maximum performance.

You will need to install W3TC via your “wp-admin” -> “Plugins” -> “Add New” if it is not already installed.  One the installation is complete you will want to activate the plugin.  Once activated you can click on “Performance” in the left navigation of your “wp-admin”.  This will drop you at a dashboard where W3TC is trying to sell all kinds of upgrades.  I will not be discussing those upgrades in this article.

You will want to click the “General Settings” option on the left navigation below “Performance” and “Dashboard“.  On the “General Settings” page under “Page Cache” you will want to check “Enable Page Cache” and set the “Page Cache Method” to “Disk: Enhanced“.

If you are running the plugin “WP Touch” you may have to perform some additional steps to make it compatible with W3TC.

Minification” can help speed up your site by reducing the amount of data the server has to transmit to the user, even cached data.  The first step is to enable “Minify” and choosing “Disk” as the “cache method” is usually ideal.

You will definitely want to test your site thoroughly to see if “minify” breaks anything.  It can cause some parts of some sites to break and appear incorrectly.  You can switch the “minify mode” to “manual” and choose what to “minify” and what to leave alone.

You can try “Database Caching” set to “Disk“, however you will want to test the performance of your site both before and after.  You will probably want to temporarily disable the “Page Cache” while testing if you choose to disable the “Don’t cache pages for logged in users” feature in the “Page Cache” advanced settings. This will help ensure you are able to test the Database Cache and not accidentally the Page Cache.

W3TC can be configured to use an Object Cache but I do not think that it is very productive in a shared hosting environment.  If you find different do please let me know in the comments.  Additionally W3TC can be configured to use Content Delivery Networks, or CDNs, but that will not be covered in this article.

Once you’ve enabled the Page Cache in Disk: Enhanced mode as well as enabled and tested for compatibility the Minify feature your site should be quick and efficient.  You can go into the advanced settings of W3TC and find many additional settings to customize the caching to suit your individual needs.

One additional step you can take is to leverage and control Browser Caching which can also be configured from within W3TC under Browser Cache in the left navigation once Performance has been selected.

4 Replies to “Configuring W3 Total Cache, W3TC, for Optimum Performance with Disk Cache for Shared Hosting – Optimizing WordPress”

    1. I find WP Super Cache easier to configure, however, W3TC is far more powerful in the customization / features. Ultimately they both work very well if properly configured.

  1. Using Cloudflare (with their free plan) – if it’s useful info. And cheapest (EIG-Justhost) shared hosting.

    Anyway, have worked with configuring W3TC and managed to ged better results than with WP Super Cache.

    However, Hyper Cache Exdended seems to get even better results (small margine, but definitely not worse), practically out of the box (doesn’t offer too much options anyway).

    Has anyone else tried that caching plugin?

Leave a Reply

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