What Are the Best W3 Total Cache Settings?
Run the Setup Guide first, then set Page Cache to Disk: Enhanced, turn Browser Cache on, and set Database Cache to Disk. Test Object Cache on and off and keep the faster result. Turn Minify on only if your host and Cloudflare leave your files unminified. Test your pages after every change.
Table of Contents
W3 Total Cache is a free plugin from BoldGrid. WordPress builds each page from scratch by running PHP and querying the database on every visit. W3 Total Cache saves the finished page and serves that copy instead. It also tells visitors' browsers to keep static files such as images, CSS, and scripts so later pages load faster.
Test every change by running a page through Google PageSpeed Insights or GTmetrix before and after. Compare time to first byte (TTFB) and total load time. Keep a setting only if both improve or hold steady.
Quick settings table
| Section | Recommended setting | Why |
|---|---|---|
| Setup Guide | Run it once | Tests Page, Database, Object, Browser Cache, and Lazy Load |
| Page Cache | Disk: Enhanced (shared hosting) | Biggest speed gain for the least risk |
| Minify | On only if your host and Cloudflare skip minification | Prevents double minification and broken layouts |
| Database Cache | Disk | Cuts repeated database queries |
| Object Cache | Test on vs off | Speeds up some hosts and adds overhead on others |
| Browser Cache | On | Returning visitors reuse downloaded files |
| CDN | Cloudflare (free plan) | Connect through the Extensions tab |
| Extensions | Activate Cloudflare | Links W3 Total Cache to your Cloudflare account |
1. General Settings
Go to Performance > Setup Guide. The wizard tests Page Cache, Database Cache, Object Cache, Browser Cache, and Lazy Load, then shows a summary. Accept the options that test faster. You can reopen this wizard any time at Performance > Setup Guide.
Next, open Performance > General Settings and confirm that each module you want is switched on.
2. Page Cache
Open Performance > Page Cache. Tick Cache front page and Cache posts and pages if they are unchecked.
Set the Page Cache method to Disk: Enhanced. BoldGrid recommends this for shared hosting. Choose Disk: Basic only if you need fragment or mfunc exceptions.
Save your settings, then open a page in a private browser window to confirm it loads properly.
3. Minify
Open Performance > Minify. Minify shrinks CSS and JavaScript files, and it is also the setting most likely to break a layout.
Leave W3 Total Cache Minify off if your host or Cloudflare already minifies your files. If neither does, turn it on and test your home page, a post, your navigation menu, and any forms or sliders. If something looks broken, follow the fix steps in section 10.
4. Database Cache
Open Performance > Database Cache, turn it on, and set the method to Disk. This matches BoldGrid's shared-hosting guidance. Check a few pages afterward and compare TTFB before and after.
5. Object Cache
Open Performance > Object Cache. Turn it on, compare TTFB before and after, and keep it only if TTFB drops. If your host offers Redis or Memcached, pick that method over Disk.
6. Browser Cache
Open Performance > Browser Cache and turn it on. This sets expiry headers so returning visitors reuse files their browser already downloaded. It also clears the caching warnings flagged by Google PageSpeed Insights.
7. CDN
A CDN serves your images and static files from servers close to each visitor. For most sites, Cloudflare's free plan is the easiest choice. Cloudflare connects through the Extensions tab, so skip Performance > CDN and follow sections 8 and 9.
If you use another provider such as Bunny CDN or Amazon CloudFront/S3, configure it under Performance > CDN. Full Site Delivery requires the Pro plan.
8. Extensions
Open Performance > Extensions, find Cloudflare, and activate it.
9. Cloudflare
- Sign up at Cloudflare and add your site.
- Select the Free plan and continue.
- Copy the two nameservers Cloudflare gives you and update them at your domain registrar or host. Wait until Cloudflare marks the site as active.
- In WordPress, go to Performance > Extensions, find Cloudflare, and open its settings.
- Connect your account with a Cloudflare API token.
- Open the Performance Dashboard and purge all caches.
10. Common issues and fixes
Layout broken after turning on Minify. Follow these steps in order and reload after each one:
- Purge the cache.
- Turn off JS minify.
- Turn off CSS minify.
- Switch Minify off completely.
Logged-in content showing to the wrong person, or old content after an edit. Purge the cache. Leave logged-in user caching off, and clear the cache after theme or plugin changes.
How to purge the cache. Hover over Performance in the top admin bar and select the purge option, or use the purge button on the Performance Dashboard.
Site crashed after setup. Connect via FTP or your host's file manager and complete these four steps:
- Open
wp-config.phpand delete:
PHP
/** Enable W3 Total Cache */
define('WP_CACHE', true); // Added by W3 Total Cache
- Open
.htaccessand delete everything between# BEGIN W3TCand# END W3TC. - Delete
advanced-cache.php,objectcache.php, anddb.phpfromwp-content. - Delete the
w3-total-cachefolder fromwp-content/plugins.
Your site will load again. Reinstall the plugin and enable one setting at a time.
Free vs Pro
The free plugin covers everything in this guide, including Page Cache, Database Cache, Object Cache, Browser Cache, Lazy Load, and the Cloudflare extension. Check W3 Total Cache Pro on BoldGrid's site for current pricing and plan tiers.
| Feature | Free | Pro |
|---|---|---|
| Page, Database, Object, Browser Cache | Included | Included |
| Lazy load & Cloudflare extension | Included | Included |
| Fragment cache & REST API caching | Excluded | Included |
| Delay scripts & remove unused CSS/JS | Excluded | Included |
| Eliminate render-blocking CSS | Excluded | Included |
| Full Site Delivery CDN | Excluded | Included |
A cache plugin builds on your server's baseline speed. A fast host gives you a low TTFB before caching even starts, and W3 Total Cache drops it further. If you are comparing hosts, read my guide to the fastest WordPress hosting.
FAQ
What is the best Page Cache method in W3 Total Cache?
On shared hosting, BoldGrid recommends Disk: Enhanced. Use Disk: Basic only if you need fragment or mfunc exceptions.
Should I turn Minify on?
Turn it on only if your host and Cloudflare leave your files unminified. Test your pages right after, and turn off JS minify first if your layout breaks.
Do I need Database Cache and Object Cache?
Turn on Database Cache with the Disk method. Test Object Cache on and off, and keep it only if TTFB improves. Redis or Memcached from your host outperforms Disk.
Does W3 Total Cache still work with Cloudflare?
Yes. Activate Cloudflare under Performance > Extensions and connect it with an API token.
Is W3 Total Cache free?
Yes. The core plugin on wordpress.org is free, and a paid Pro version is available from BoldGrid for additional features.
HTML