Speed & performance · Info
W3 Total Cache Redis Settings Explained: What Each Option Does

Short answer
W3 Total Cache can store page, database or object cache data in Redis. Pick Redis as the method in General Settings, then enter the server address, port, database ID and password on that module's page. Object cache is the best use of Redis for most WordPress sites.
Key takeaways
- Redis needs a running Redis server and the PHP Redis extension.
- Choose Redis per module under Performance > General Settings.
- Object cache gains the most from Redis.
- Enter host and port, usually 127.0.0.1:6379, then click Test.
- Use separate database IDs when sites share one Redis server.
- Run only one object cache plugin at a time.
What do the W3 Total Cache Redis settings do?
W3 Total Cache's Redis settings let you store page, database or object cache data in a Redis server's memory instead of on disk, and tell the plugin how to connect to that server.
Redis is an in-memory data store. Reading from memory is much faster than reading from disk or running the same database query again. W3 Total Cache can use it as the storage method for several of its caching modules.
There are two layers of settings:
- The method choice on the General Settings page, where you pick Redis for a module.
- The connection settings on that module's own page, where you enter the server address, password and timeouts.
This guide explains both. If you are new to the plugin, read what W3 Total Cache is first.
What do you need before Redis appears as an option?
You need a running Redis server and the PHP Redis extension installed on your hosting, otherwise W3 Total Cache shows the Redis method greyed out or unavailable.
Two things must be in place:
- A Redis server. Many managed hosts and VPS control panels can enable it with one click. On your own server, you install the Redis service.
- The PHP extension. PHP talks to Redis through an extension, usually phpredis. Your host must enable it for your PHP version.
W3 Total Cache's own wiki has a Redis server installation FAQ with server-side steps. On shared hosting, ask support whether Redis is available and what connection details to use.
If your host offers Redis, they will give you a host and port, often 127.0.0.1:6379, or a socket path. Some also give a password and a database number.
Where do you choose Redis in W3 Total Cache?
Go to Performance > General Settings, find the module you want, enable it, and pick Redis from its Method dropdown, then save.
The modules that can use Redis are:
| Module | What it stores | Use Redis? |
|---|---|---|
| Page Cache | Full HTML pages | Optional; disk methods are often just as good |
| Minify | Combined CSS and JS files | Rarely worth it |
| Database Cache | Results of database queries | Usually skip if object cache is on |
| Object Cache | WordPress objects and transients | Yes, the best use of Redis |
Object cache is where Redis helps most. WordPress has a built-in object cache API, but by default it only lasts for a single page load. A persistent backend such as Redis keeps that data between requests.
For a full walkthrough of the other General Settings, see our W3 Total Cache recommended settings guide.
What does the Redis hostname and port setting mean?
This field tells W3 Total Cache where your Redis server is, written as host:port, such as 127.0.0.1:6379 for a Redis server on the same machine.
After choosing Redis as a method, open that module's page, for example Performance > Object Cache. Near the top you will see a field for the Redis server address.
- Local server:
127.0.0.1:6379is the most common value. - Remote server: use the IP or hostname your provider gives you, plus the port.
- Unix socket: some hosts use a socket file instead of a port. Enter it in the format your host's documentation gives.
- Multiple servers: the field may accept more than one address, one per line, for advanced setups.
Click the Test button next to the field. A pass message means W3 Total Cache can reach Redis. A failure usually means a wrong address, a missing PHP extension or a firewall.
What do persistent connection and TLS options do?
Persistent connection keeps the link to Redis open between requests to save a little time, and the TLS option checks the server's certificate when you connect over an encrypted link.
Use persistent connection. When enabled, PHP reuses an open connection instead of opening a new one on each page load. This can help slightly on busy sites. On some shared setups it causes errors, so leave it off if you see connection problems.
Verify TLS certificates. This applies when your Redis provider requires an encrypted (TLS) connection, which is common with remote managed Redis. Keep it on if your provider uses a valid certificate. Turn it off only for testing with self-signed certificates.
Local Redis servers on the same machine usually do not use TLS at all.
What do the timeout and retry settings control?
Connection timeout, read timeout and retry interval set how long W3 Total Cache waits for Redis before giving up, which stops a slow or offline Redis server from freezing your site.
- Connection timeout: how many seconds to wait while opening the connection. A value of 0 often means no limit, which can be risky.
- Read timeout: how long to wait for Redis to answer a request.
- Retry interval: how long to wait before trying to reconnect after a failure.
For a local server, short timeouts are fine because Redis answers almost instantly. For a remote server, allow a little more. The aim is to fail fast so pages can load without the cache, rather than hang.
If you are unsure, leave the defaults and only change them if your host advises it.
What are the database ID, username and password fields for?
Database ID chooses which numbered Redis database to use, and the username and password let W3 Total Cache log in when the Redis server requires authentication.
Database ID. Redis has numbered databases, starting at 0. If several sites share one Redis server, give each site its own number so their data does not mix. Your host may assign one.
Password (and username, where shown). Required when Redis has authentication turned on. Copy them exactly from your host's panel.
Sharing one Redis database between sites without separation can cause one site to see another's cached data. If you cannot use separate IDs, make sure each site uses a unique cache key prefix.
What do the lifetime and group settings on the Object Cache page do?
Lifetime sets how long cached objects live, while global and non-persistent groups decide which kinds of WordPress data are shared or never cached.
On Performance > Object Cache you will also see:
- Default lifetime of cache objects. Seconds before an item expires. The default is a reasonable start.
- Garbage collection interval. Mainly matters for disk storage. Redis expires keys on its own.
- Global groups. Data shared across a multisite network.
- Non-persistent groups. Data that should never be stored, such as counts that change constantly.
- Enable caching for wp-admin requests. Can speed up the dashboard but sometimes causes stale admin screens.
- Store transients in database. Keeps transients in the database as well as Redis.
Leave groups at their defaults unless a plugin's documentation tells you to add one.
Should you use W3 Total Cache or a dedicated Redis plugin?
If you already use W3 Total Cache, its built-in Redis support is enough; if you use a different page cache plugin, a dedicated plugin such as Redis Object Cache is simpler.
You should only run one object cache. Two plugins trying to install their own object-cache.php drop-in will conflict.
The Redis Object Cache plugin is a popular single-purpose option.
Our guide to setting up Redis object cache in WordPress covers that route.
If you are still choosing a backend, see Redis vs Memcached for WordPress.
How do you test and troubleshoot the Redis setup?
Use the Test button, then check the W3 Total Cache dashboard and your site's speed, and if pages break, switch the method back to Disk to confirm Redis is the cause.
Common problems and fixes:
- Test fails. Check the address and port, confirm the PHP extension is loaded, and ask your host if Redis is running.
- Site shows errors after enabling. Switch the object cache method back to Disk or disable it, then contact your host.
- Changes do not appear. Purge all caches from the Performance menu. Our guide on how to clear W3 Total Cache shows each option.
- Memory fills up. Ask your host to raise the Redis memory limit or set an eviction policy.
BoldGrid, the team behind W3 Total Cache, also has a support article on object cache that explains how the module behaves.
Frequently asked questions
Why is Redis greyed out in W3 Total Cache?
Redis appears unavailable when the PHP Redis extension is not installed or enabled on your server. Ask your host to enable it for your PHP version, and confirm a Redis server is running. After that, the option should become selectable.
Should I use Redis for page cache in W3 Total Cache?
It is optional. Disk-based page caching is fast and simple for most sites. Redis helps most with object cache, where WordPress repeats many small lookups. Busy sites on servers with plenty of memory may also benefit from Redis page cache.
What port does Redis use?
Redis uses port 6379 by default. Your host may use a different port or a socket file instead, so always check the connection details your host provides before entering them in W3 Total Cache.
Can I use W3 Total Cache Redis with the Redis Object Cache plugin?
No, do not run both as object caches. Each tries to install its own object cache drop-in, which leads to conflicts. Choose W3 Total Cache's built-in object cache or the dedicated plugin, not both.
Do I need both database cache and object cache on Redis?
Usually not. Object cache already stores much of the data that database caching would hold. Many site owners enable only object cache with Redis and leave database cache off to avoid extra complexity.
Sources
- FAQ: Installation: Redis Server W3 Total Cache on GitHub
- Object Cache BoldGrid Support
- WP_Object_Cache class WordPress Developer Resources
- Redis Object Cache plugin WordPress.org
- phpredis extension GitHub
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


