---
title: "Optimal W3 Total Cache settings"
date: "2015-01-26"
category: "wordpress"
slug: "optimal-w3-total-cache-settings"
---

## Overview

[W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/) is a comprehensive caching plugin for WordPress that reduces page load times by caching pages, database queries, and objects, while combining CSS and JavaScript files to minimize HTTP requests.

## Installing W3 Total Cache

1. Log in to your WordPress admin portal (e.g. `http://example.com/wp-admin`)
2. Navigate to **Plugins** > **Add New**

    !["Add New" location underneath Plugins](kb-image:wordpress-plugin-location.png)
*"Add New" location underneath Plugins*
3. Search for _W3 Total Cache_
4. Click **Install Now**
5. Enter your FTP credentials to install the plugin securely
    - Set **Hostname** to `localhost` (keeps traffic local on the server)
    - See [[accessing-ftp-server]] for FTP details, or [[resetting-your-password]] if needed
6. Click **Activate** once installed

## Configuring W3 Total Cache

### Automatic Configuration (Recommended)

1. Navigate to **Performance** > **General Settings** > **Import/Export** and select **Import configuration**
2. Extract `w3-settings.php` from the attached zip file and select it:
    - [Download w3-settings.zip](kb-image:w3-settings.zip) (sha256: `cce8cbc6a210a8cbde05b86d3b252a930f0396877eb4b6727ec1939fe5d202f0`)
    - Note: Minification is enabled for logged-in users by default. If you are actively editing your theme, disable this via **General Settings** > **Minify** > **Disable for logged in users** > **enable**.
3. Click **Upload**
4. A "_Settings successfully uploaded_" confirmation will appear on success.

    ![W3 Total Cache import success confirmation dialog.](kb-image:w3-import-success.png)
*W3 Total Cache import success confirmation dialog.*

### Manual Configuration

Leave all values at their defaults unless specified below.

**General Settings:**

- Page cache: **enable**, method: **Disk: Enhanced**
- Minify: **enable**, cache method: **disk**
- Database cache: **enable**, method: **disk**
- Object cache: **enable**, method: **disk**
- Browser cache: **enable**
- Verify rewrite rules: **enable**

**Minify Settings:**

- Rewrite URL structure: **enable**
- Disable minify for logged in users: **enable**
- HTML minify: **disable**
- JS minify: **enable**, operation: **combine only** + **non-blocking using "async"**
- CSS minify: **enable**, mode: **combine only**

## Why These Settings

**Combine, don't compress:** The recommended settings combine JavaScript and CSS files without heavy minification. On low-traffic sites, the overhead of recompressing assets each time the cache expires outweighs the benefit. Combining files alone significantly reduces HTTP request count.

**Disk cache over APC/OPCache:** When the HTTP server restarts (e.g. after adding addon domains), APC/OPCache caches are purged. Disk-based caching survives restarts. For high-traffic sites, APC/OPCache may offer better performance by serving cached content directly from memory.

**Performance impact:** Testing with [webpagetest.org](http://webpagetest.org) shows a 36% improvement in post processing time and 3.7% faster external asset loading. Gains increase with the number of installed plugins.

![Page loads before and after caching.](kb-image:caching-before-and-after.png)
*Page loads before and after caching.*

## See Also

- [W3 Total Cache FAQ](https://wordpress.org/plugins/w3-total-cache/faq/)
