W3 Total Cache Plugin Setup for WordPress

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Setting Up W3 Total Cache Plugin for WordPress

W3 Total Cache is a free alternative to WP Rocket with more flexible settings and support for multiple cache storage backends: Disk, Memcached, Redis, APC, CDN integration.

Choosing Page Cache Method

Disk: Enhanced—cache saved to disk, Nginx serves static files without PHP. Best choice for most hosting.

Disk: Basic—PHP checks for cache existence, less efficient.

Memcached / Redis—cache in memory. Faster than disk, but requires configured server and sufficient RAM.

For choice: if you have Redis or Memcached—use them. Otherwise—Disk Enhanced.

General Settings Configuration

Page Cache: ✓ Enable
Page Cache Method: Disk: Enhanced

Minify: ✓ Enable
Minify Mode: Manual  (Auto breaks JS)
Minify Cache Method: Disk

Object Cache: ✓ Enable (if Redis/Memcached available)
Object Cache Method: Redis

Browser Cache: ✓ Enable

CDN: ✓ Enable (if using CDN)

Page Cache Setup

Page Cache → Page Cache Settings:

  • Cache front page: ✓
  • Cache feeds: ✓
  • Cache SSL: ✓ (if site on HTTPS)
  • Don't cache pages for logged in users: ✓
  • Don't cache pages with GET parameters: ✓ (except utm_*)

Rejected User Agents (don't cache for crawlers):

.*bot.*
.*crawler.*

Rejected Cookies:

wordpress_logged_in
woocommerce_cart_hash

Redis Object Cache

// wp-config.php
define('W3TC_CONFIG_DATABASE', true);

In W3TC settings → Object Cache:

  • Object Cache Method: Redis
  • Redis hostname: 127.0.0.1
  • Redis port: 6379
  • Redis database: 1

Check: W3TC → Dashboard → verify Object Cache shows HIT.

Minification: Manual Mode

Minify → JS:
- Embed type: Non-blocking using "defer"
- Add each JS file manually with correct type

Minify → CSS:
- Embed type: Inline
- Combine files: ✓ (if HTTP/1.1, not HTTP/2)

Manual mode requires careful setup for each site, but won't break scripts automatically.

Browser Cache

Expires Headers for static files:

CSS, JS: 1 year
Images: 1 year
Fonts: 1 year
HTML: don't cache

W3TC adds Cache-Control and Expires headers via .htaccess (Apache) or requires manual Nginx setup.

Nginx Config for Disk Enhanced

# Cached pages
set $cache_uri $request_uri;

if ($request_method = POST) { set $cache_uri 'null cache'; }
if ($query_string != '') { set $cache_uri 'null cache'; }
if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-.*.php|index.php|sitemap(_index)?.xml)") {
    set $cache_uri 'null cache';
}
if ($http_cookie ~* "comment_author|wordpress_logged_in|wp-postpass|woocommerce") {
    set $cache_uri 'null cache';
}

location / {
    try_files /wp-content/w3tc/pgcache/$cache_uri/_index.html $uri $uri/ /index.php?$args;
}

Comparison with WP Rocket

W3 Total Cache is free and more flexible in settings, but requires more configuration time and careful minification setup. WP Rocket is simpler, works "out of the box" better, but costs money. For technical VPS users—W3TC is a reasonable choice.

Timeline

Installation and setup of W3 Total Cache with site-specific testing—4–6 hours.