The question of Redis or Memcached for a WordPress object cache on cPanel rarely turns on raw throughput — both will handle millions of wp_options lookups per second on hardware the customer is already paying for. The real difference shows up in how each behaves under memory pressure, how cleanly the object cache fails closed, and how often the WordPress object-cache drop-in actually invalidates on save. We default to Redis for most WordPress sites and use Memcached only when the customer’s host setup makes Redis impractical.
What’s happening
Memcached stores everything in RAM and evicts using LRU when full. It is connection-pooled, multi-threaded, and very fast — but a restart or an OOM kill loses everything. Redis stores in RAM with optional persistence, supports tagged invalidation through its key namespace, and lets you watch eviction patterns through INFO. On cPanel hosts with per-user CageFS, Redis is typically installed system-wide with per-user Unix socket access, which is both faster than TCP and immune to noisy-neighbour port reuse issues.
How to verify
Check whether an object cache is even active for a given WordPress install:
cd /home/<user>/public_html
wp cache type
ls -la wp-content/object-cache.php
Then on the host, check that the daemon is alive and what it is using:
redis-cli ping
redis-cli INFO memory | grep used_memory_human
redis-cli INFO stats | grep keyspace_
memcached-tool 127.0.0.1:11211 stats | grep -E 'curr_items|evictions'
A Redis evicted_keys value that grows steadily, or a Memcached evictions value above zero, means the cache is too small for the working set. The object cache is doing real work, but losing entries faster than it should.
The fix
- Install Redis system-wide, set
maxmemoryto a fixed value per the host’s RAM budget, and setmaxmemory-policy allkeys-lru. Per-user Unix sockets via the Redis cPanel plugin or a per-user instance keep tenant data isolated. - Install the Redis Object Cache plugin (or LiteSpeed’s built-in object cache) on the WordPress site, point it at the socket, and flush the cache once.
- For Memcached: install
memcached, run as a single instance with-msized to the available RAM, and use the W3 Total Cache or LSCache object-cache integration. - Watch
redis-cli INFO statsover a week. Hit rate above 90% means the cache is doing what it should; below 80% means either the size is wrong or the application is invalidating too aggressively.
For sites where the object cache has to survive deploys and restarts, Redis with appendonly persistence is the only sensible choice. Stack Harbor configures both as part of managed cPanel operations.