Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Explainers · Explainer

What Is Redis? A Plain Explanation

What Is Redis? A Plain Explanation

Short answer

Redis is an open-source, in-memory data structure store that works as a database, cache, message broker, and streaming engine. It keeps data in RAM, so most operations finish in under one millisecond. WordPress sites use it mainly as a persistent object cache to cut database load.

Key takeaways

  • Redis is an open-source, in-memory data structure store that works as a database, cache, message broker, and streaming engine.
  • It stores data as key-value pairs in RAM, so most operations finish in under one millisecond.
  • Strings hold up to 512 MB, and Redis also supports Lists, Sets, Hashes, Sorted Sets, Streams, JSON, and vector sets.
  • A single instance handles over 100,000 operations per second on modest hardware.
  • RDB snapshots and an append-only log keep data safe across restarts.
  • WordPress uses Redis as a persistent object cache, but only when the host provides the Redis server.

What is Redis?

Redis is an open-source, in-memory data structure store that works as a database, cache, message broker, and streaming engine.

The name is short for Remote Dictionary Server. Redis keeps its working data in RAM instead of on disk, so reads and writes finish in sub-millisecond time, according to redis.io. That speed is why it shows up in caching, session storage, leaderboards, and real-time analytics.

Redis belongs to the NoSQL family of key-value stores. Each item lives under a unique key, and the value can be a simple string or a richer structure such as a list, set, or hash. Unlike a relational database, Redis has no tables and no fixed schema.

Redis is free and open-source software. As of Redis 8, the source is available under the RSALv2, SSPLv1, and AGPLv3 licenses, while Redis 7.2 and earlier releases use the BSDv3 license, according to redis.io.

How does Redis work?

Redis stores data as key-value pairs in memory, and your application talks to it over the network with simple commands.

You set a value with a command such as SET and read it back with GET. The redis.io tutorial shows a basic example where the key “myname” holds a name in a String.

Each data type has its own set of commands, so you work with lists, sets, and hashes directly on the server instead of fetching raw text and sorting it in your own code.

Keys sit in a flat keyspace with no enforced naming policy. That freedom lets you organize keys any way you like, for example with prefixes such as “user:42” or “cart:918”, but it also means a clear naming habit matters as a project grows.

What data types does Redis support?

Redis stores more than plain strings, and each type is built for a different access pattern.

Data typeWhat it holdsCommon use
StringsText, numbers, or binary data up to 512 MBCounters, cached values, session tokens
ListsOrdered collections of stringsActivity feeds, message queues
SetsUnordered collections of unique stringsTags, unique visitors
HashesMaps of field-value pairs, like objectsUser profiles, product details
Sorted SetsSets ordered by a numeric scoreLeaderboards, rate limiters
StreamsAppend-only log entriesEvent sourcing, activity logs
JSONNative JSON documentsAPI response caching
Vector setsElements with vector embeddingsSemantic search, recommendations

Special types cover narrower jobs. Redis also supports Bitmaps, Bitfields, HyperLogLog, and Geospatial indexes for advanced use cases, according to redis.io. You pick the type that matches the question you will ask the data, not the other way around.

What is Redis used for?

Redis fits any job where fast access to small, changing data matters more than complex queries.

  • Caching: store frequently accessed data in memory to cut database load and speed up responses.
  • Session management: hold user session data across distributed web applications with built-in expiry.
  • Leaderboards: use Sorted Sets to rank players or pages in real time.
  • Real-time analytics: track metrics and counts with sub-millisecond writes.
  • Pub/Sub messaging: broadcast messages to many subscribers for chat and notifications.
  • Rate limiting: control API use with counters that expire on their own.
  • Queues: use Lists or Streams as lightweight task queues for background jobs.
  • GenAI and vector search: store embeddings and run similarity searches for retrieval-augmented generation.

Caching is the most common use on WordPress sites. A cache plugin can store rendered pages or database results in Redis so repeat visits skip slow work. If you run LiteSpeed, check whether a cache plugin helps on LiteSpeed hosting before adding another layer.

How fast is Redis?

Redis answers most operations in under one millisecond, often in single-digit microseconds, because every read and write hits RAM.

A single Redis instance handles over 100,000 operations per second on modest hardware, and benchmarks on tuned setups regularly pass 1 million operations per second, according to redis.io. That headroom is why gaming leaderboards, ad bidding, and trading platforms use it for real-time data.

Speed comes from a simple design. Redis runs a single-threaded event loop for commands, which removes locking overhead and keeps each operation atomic. Since Redis 6.0, network input and output run on background threads, so the single command thread is not the bottleneck it sounds like.

If you need more cores, run extra instances or use Redis Cluster to split data across nodes. For a WordPress site, the number of PHP workers on your plan often limits speed before Redis does.

How does Redis keep data after a restart?

Redis saves data to disk so it survives a restart, even though reads and writes happen in memory.

It offers two persistence methods. RDB takes point-in-time snapshots of the data at set intervals, while AOF logs every write operation in an append-only file. You can use either one or combine both for a balance of speed and safety, according to redis.io.

A snapshot alone can lose the writes made since the last save, while the log alone can grow large and slow down restarts. Combining them covers both gaps, at the cost of more disk use and a slightly more complex setup.

Persistence is a safety net, not a promise of zero loss. If every write must survive a crash, a disk-based database with strict transaction rules fits better than Redis alone.

Is Redis a database or a cache?

Redis can be either, and many teams use it as both at once.

As a cache, Redis sits in front of a slower database and holds copies of hot data. As a database, it holds the only copy and relies on RDB snapshots or the AOF log to survive restarts.

Redis works well as a primary store when you need fast reads and writes, flexible modeling, and horizontal scaling, according to redis.io.

It fits less well when you need joins across tables, foreign keys, or transactions that span many keys. A relational database such as MySQL or MariaDB still handles those jobs better.

The two often work side by side, with Redis on the hot path and the relational store holding the full record. See how MySQL compares with MariaDB for WordPress if you are weighing the disk-based side.

How is Redis different from Memcached?

Redis does more than Memcached, while Memcached stays simpler and lighter for plain string caching.

FeatureRedisMemcached
Data typesStrings, Lists, Sets, Hashes, Sorted Sets, Streams, JSONStrings only
PersistenceRDB snapshots and AOF logNone, data is lost on restart
MessagingBuilt-in Pub/SubNone
ScriptingLua scripts run on the serverNone
ScalingRedis Cluster with shardingClient-side sharding only

Memcached stores only strings and keeps nothing after a restart. Redis adds lists, sets, hashes, sorted sets, streams, and JSON, plus persistence and messaging. That is why Redis beats Memcached for most WordPress caching jobs once you need more than basic page fragments.

Pick Memcached only when you want the smallest possible setup for simple string caching. Pick Redis when you need sorted sets for a leaderboard, a queue for background jobs, or data that must survive a restart.

Do you need Redis for a WordPress site?

Most small WordPress sites do not need Redis, and larger or busier sites often gain real speed from it.

WordPress has a built-in object cache, but by default it is not persistent: cached data lives only for one request. The WordPress Advanced Administration Handbook explains that a persistent object cache cuts database trips on every page view, and your host must provide the cache server before a plugin can use it.

Start with page caching and a current PHP version first. Those two steps fix most slow sites at no extra cost.

Add Redis when the database is the bottleneck, when traffic spikes overload it, or when logged-in traffic cannot use page caching. Our guide to speeding up WordPress covers the order to try things in.

If you want a managed option, Redis Cloud offers a free tier with 30 MB of storage, which is enough to prototype and learn, according to redis.io. Paid tiers scale with use and add automated backups and geo distribution.

What mistakes should you avoid?

The most common Redis mistake is treating it as a full replacement for your database without a backup plan.

  • No persistence set up: a restart wipes everything if neither RDB nor AOF is on.
  • No expiry on cache keys: stale data piles up and memory fills with entries nobody reads.
  • Huge values: a single String can hold up to 512 MB, but storing large blobs in Redis wastes RAM and slows commands.
  • No memory cap: without a limit, Redis can grow until the server runs out of memory.
  • No monitoring: you will not notice a full cache or a failed save until visitors do.

Set an expiry on cache keys, cap memory use, and confirm persistence is on before you trust Redis with anything you cannot rebuild. A cache that fills up or loses data without warning is worse than no cache at all.

Frequently asked questions

What does Redis stand for?

Redis is an in-memory data structure store that works as a database, cache, message broker, and streaming engine. The name is short for Remote Dictionary Server. It stores data as key-value pairs in RAM, which is why it answers most requests in under one millisecond.

Does Redis lose data when the server restarts?

Yes, if you set up persistence. Redis offers RDB snapshots and an append-only log, and you can use both together. Without either one turned on, a restart wipes the data, so check the settings before you trust Redis with anything important.

Do I need Redis for a small WordPress site?

No. Most small WordPress sites run fine with page caching and a current PHP version. Add Redis when the database is the bottleneck, when traffic spikes overload it, or when logged-in traffic cannot use page caching. Your host must provide the Redis server first.

What is the difference between Redis and Memcached?

Memcached stores only strings and keeps nothing after a restart, while Redis supports lists, sets, hashes, sorted sets, streams, and JSON, plus persistence and messaging. Memcached is simpler, but Redis fits more jobs, including leaderboards, queues, and session storage.

How fast is Redis in practice?

A single instance handles over 100,000 operations per second on modest hardware, and tuned setups pass 1 million operations per second. Real speed depends on your server, your data size, and your network, so treat those figures as a ceiling, not a promise.

Sources

  1. What is Redis? In-memory database, cache, and message broker Redis
  2. What is Redis Explained? IBM
  3. Optimization - Advanced Administration Handbook WordPress Developer Resources
  4. Redis Wikipedia

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.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.