Redis Object Cache

Updated on 10. 2. 2026



Redis Object Cache

Overview

Redis object cache stores WordPress objects (queries, transients, metadata) in Redis to reduce database load.

Requirements

  • Redis server accessible from PHP.
  • Write access to wp-content/ (for object-cache.php drop-in).
  • Write access to wp-config.php (for Redis constants).

Enable in the UI

  1. Open ZiziCache Object Cache (Redis).
  2. Enter connection details (TCP host/port or Unix socket path).
  3. Optional: set database index, key prefix/salt, and timeouts.
  4. Optional: set ACL username + password (Redis 6+), or password only.
  5. Click Test Connection and then enable Redis.

What ZiziCache changes

  • Installs wp-content/object-cache.php drop-in.
  • Writes Redis constants into wp-config.php (host/port or socket path, database, timeouts, prefix, credentials).

Status and diagnostics

  • Status is fetched via REST and uses a Redis PING check through Predis.
  • If Redis is disabled in the UI, no connection attempt is made.

WP-CLI

# Flush Redis (uses Predis flushdb)
wp zizi-cache redis-flush

# Flush object cache (backend-agnostic)
wp zizi-cache object-cache-flush

REST API

  • GET /wp-json/zizi-cache/v1/redis-status
  • POST /wp-json/zizi-cache/v1/redis-flush

Mutual exclusivity

Only one object cache backend can be active at a time. Enabling Redis disables Memcached and vice versa.

Limits and notes

  • Predis is bundled with the plugin. If it cannot be loaded, Redis status/flush will fail.
  • Configuration is applied via wp-config.php; changes require file write access.
What are your feelings