TL;DR Redis
Redis is an open source in-memory data structure store that is most commonly used as a cache, message broker, or session store. Unlike traditional databases that read and write data to disk, Redis keeps its entire dataset in RAM which makes it extraordinarily fast, capable of handling millions of operations per second with sub-millisecond response times. For WordPress sites, Redis is used as an object cache, storing the results of database queries in memory so that repeat requests are served instantly without hitting the database again. This reduces database load significantly and makes sites feel much more responsive under traffic. CloudSonic installs and manages Redis on every server, configured with an LRU eviction policy so it never runs out of memory, and connected via a Unix socket for the fastest possible communication with PHP. It integrates directly with managed WordPress hosting and works alongside MariaDB and PostgreSQL as part of the CloudSonic stack.
How Redis Works
Redis stores all of its data in RAM rather than on disk, which is what makes it so fast. Every read and write operation happens in memory at nanosecond speeds rather than the microsecond to millisecond speeds of disk-based databases. Redis supports a rich set of data structures beyond simple key-value pairs, including lists, sets, sorted sets, hashes, and streams, which makes it flexible enough to serve as a cache, a session store, a message queue, a leaderboard, or a pub-sub messaging system depending on how it is used. For WordPress, Redis is used as an object cache. WordPress generates pages by running PHP code that queries the MySQL or MariaDB database repeatedly. With Redis installed, the results of those database queries are stored in Redis after the first execution. Subsequent page loads that require the same data retrieve it from Redis in memory rather than querying the database again, dramatically reducing database load and page generation time.
# Check if Redis is running
redis-cli ping
# Expected output: PONG
# Check Redis memory usage
redis-cli info memory | grep used_memory_human
# Check how many keys are cached
redis-cli dbsize
# Check the object cache hit rate
redis-cli info stats | grep -E 'keyspace_hits|keyspace_misses'
# Flush the Redis cache (use with caution on production)
redis-cli flushall
# Watch Redis commands in real time to confirm WordPress is using the cache
redis-cli monitor
# Output example (shows WordPress object cache reads and writes):
# 1725868412.123456 [0 127.0.0.1:54321] "GET" "wp:alloptions"
# 1725868412.124891 [0 127.0.0.1:54321] "GET" "wp:post_meta:42"
# 1725868412.126234 [0 127.0.0.1:54321] "SETEX" "wp:query:a1b2c3" "3600" "..."
# 1725868412.127891 [0 127.0.0.1:54321] "GET" "wp:user:1"
# Press Ctrl+C to stop monitoring
Why Redis Matters for Your Website
The single biggest performance bottleneck for most WordPress sites is database queries. WordPress generates pages by running PHP that queries the database repeatedly, and on a busy site with many plugins each page load can trigger dozens or even hundreds of database queries. Even on fast hardware with NVMe storage, this adds latency that accumulates across every page load. Redis eliminates the majority of this database load by caching query results in memory. After the first page load, subsequent loads retrieve data from Redis at memory speeds rather than querying the database at all. The difference in response time is significant and directly measurable. Sites that implement Redis object caching typically see TTFB reductions of 50 to 80 percent for cached pages. Under traffic spikes, the database load reduction is even more valuable because it means the database does not become the bottleneck that causes the site to slow down or fall over when visitor numbers surge.