Redis is a data store that keeps its data directly in memory (RAM) rather than on disk, which is why it can read and write very quickly. On websites and in applications, it's used mostly for caching, user sessions and background job queues. By keeping the main database from doing the same work over and over on every request, it helps pages and applications respond faster.
In short
- Redis is a data store that keeps data in memory and offers data types such as lists, sets and hashes, beyond a simple key-value structure.
- Its most common uses are caching, session storage, job queues, counters and leaderboards.
- Although it runs in memory, it can write data to disk with RDB snapshots and the AOF log.
- Its license changed from BSD to RSALv2/SSPLv1 in March 2024. In May 2025, an AGPLv3 option was added with Redis 8.
- Valkey is an alternative developed under the Linux Foundation with a BSD license, continuing from Redis 7.2.4.
What is Redis?
The name Redis comes from "REmote DIctionary Server." The project was started by Salvatore Sanfilippo. The official documentation describes Redis as a "data structure server": in Redis, values aren't just plain strings; they can also be basic data structures such as lists, sets, sorted sets and hashes, and you can perform atomic operations on these structures.
The main reason Redis is fast is that the dataset is kept in memory. Reading from memory is much faster than reading from disk. The trade-off is clear: your dataset can't be larger than the server's memory, and memory is a more expensive resource than disk.
Here's an analogy: your main database (e.g. MySQL or PostgreSQL) is the company's archive room. Everything is there, but finding a file takes time. Redis is the notepad on your desk. You jot down the information you look up often, and next time you get the answer without going down to the archive.
Which data types does Redis support?
Redis's core data types are:
- String: The simplest type. One value per key. Used for caching and counters.
- Hash: Records made of field-value pairs. Suitable for holding a user profile or a product summary.
- List: Items ordered by insertion. Can be used for simple job queues.
- Set: An unordered collection of unique items.
- Sorted set: Each item has a score, and items are kept sorted by that score. Ideal for leaderboards.
- Stream: An append-only log structure in which events are recorded in order.
There are also geospatial indexes, probabilistic data types such as HyperLogLog, and bitmaps. With Redis 8, features that previously lived in separate modules, such as JSON, time series and vector sets, were also brought into the core.
How does Redis speed up websites and applications?
1. Caching
This is the most common use. When the application needs a piece of data, it checks Redis first. If the data is there (cache hit), it returns it directly. If not (cache miss), it reads it from the main database, writes the result to Redis for a while and returns it. On the next request, the same query never reaches the database.
For example, if building a product list takes several heavy database queries, keeping the result in Redis for a few minutes both shortens response time and reduces the load on the database.
2. Session storage
When a user logs in, the session information has to be kept somewhere. If the application runs on more than one server, sessions need to live in a shared place that every server can reach. Redis is a popular choice for this because it's fast and keys can be given an expiration time (TTL).
3. Job queues
Tasks such as sending email, generating PDFs or sending data to an external service are pushed to the background so the user doesn't have to wait. These jobs are written to a queue and processed in order by a separate worker process. For example, the Laravel framework offers Redis among its queue drivers, alongside the database, Amazon SQS and Beanstalkd.
4. Counters, rate limiting and rankings
Tasks such as counting how many requests an API receives per minute, limiting a user's login attempts or ranking the most viewed content are easy with Redis's atomic counters and sorted sets.

Redis on WordPress sites
WordPress's own object cache is not persistent by default. According to the WordPress developer documentation, cached data stays in memory only for the duration of that request and isn't kept between page loads unless a persistent caching plugin is installed. A system such as Redis or Memcached is used to make this object cache persistent. For example, the LiteSpeed Cache plugin supports Memcached, LiteSpeed's LSMCD and Redis for object caching.
That doesn't mean every WordPress site needs Redis. On a simple corporate site where most visitors are served cached pages, page caching is often enough. A Redis object cache makes more of a difference on sites with many logged-in users, on sites with dynamic content such as WooCommerce, or on sites where the admin dashboard runs slowly.
Is Redis persistent? Persistence options
"If it runs in memory, is the data lost when the server shuts down?" is a common question. The answer depends on the configuration. According to the official documentation, Redis's persistence options are:
| Option | How it works | Strength | What to watch for |
|---|---|---|---|
| RDB (snapshot) | Writes a copy of the entire dataset to disk at set intervals | Compact file, suitable for backups and fast restarts | A few minutes of data after the last snapshot can be lost |
| AOF (append-only file) | Appends every write to a log and replays it at startup | More durable; with the default setting (fsync every second), at most about one second of data loss | Files are larger than RDB |
| No persistence | Nothing is written to disk | The simplest setup; can be used as a pure cache | All data is lost on restart |
| RDB + AOF | Both together | The approach the documentation recommends for strong data safety | More disk and configuration |
A practical rule: if you only use Redis as a cache, lost data can be rebuilt from the main database, so persistence isn't that critical. If you keep data in Redis whose loss would cause problems, such as sessions or queues, you need to choose your persistence settings deliberately.
You also need to decide what happens when memory fills up. You can set an upper limit with the maxmemory setting. When the limit is reached, Redis either returns errors on write commands or deletes some keys according to the configured eviction policy.
Security: Redis should not be exposed to the internet
Redis's official security documentation says it plainly: Redis is designed to be accessed by trusted clients inside a trusted environment. Exposing the Redis port directly to the internet is not a good idea. The documentation points out that an attacker with external access could delete all the data with a single FLUSHALL command.
Basic precautions:
- Bind Redis only to the local network interface (
bind 127.0.0.1) or close the port with a firewall. - Enable authentication with a password or with the access control lists (ACLs) introduced in Redis 6.
- Run Redis not as root but as a separate user with restricted privileges.
- Keep up with software updates. This should be part of your overall website maintenance plan.
The Redis license change: a short history
For many years, Redis was distributed under the open-source BSD 3-Clause license. In the last two years, that changed twice. As of July 2025, the picture is:
- Redis 7.2 and earlier: BSD 3-Clause license. These versions can continue to be used under that license.
- 20 March 2024: Redis, the company, announced that new versions starting with Redis 7.4 would be distributed under a dual RSALv2 (Redis Source Available License) and SSPLv1 (Server Side Public License) license. The company openly acknowledged that these licenses do not count as open source under the OSI definition and named the free version "Redis Community Edition." According to the company, nothing changed for end users using Redis for their own internal purposes; the restrictions were aimed mainly at providers offering Redis as a competing managed service.
- 1 May 2025: With Redis 8, the OSI-approved open-source AGPLv3 license was added as a third option. Redis 8 and later can be used under RSALv2, SSPLv1 or AGPLv3. The free version was also renamed "Redis Open Source" again.
For a business using Redis inside a website or its own application, these changes generally don't affect day-to-day operations. However, if you offer Redis as a service to others or embed it in software you distribute, you should review the license terms with an expert.

What is Valkey?
After the license change, on 28 March 2024, the Linux Foundation announced a project called Valkey. Valkey is a BSD 3-Clause licensed, open-source in-memory data store that continues development from 7.2.4, the last BSD-licensed version of Redis. The announcement listed Amazon Web Services, Google Cloud, Oracle, Ericsson and Snap Inc. as backers.
Because Valkey started out protocol-compatible with Redis, it works with most Redis client libraries. Valkey 8.0 was released in September 2024 and Valkey 8.1 in April 2025. Since the two projects now develop separately, feature differences may emerge over time. Whether to choose Redis or Valkey for a new project should depend on what your hosting provider offers, the features you need and your license preference.
When is Redis not necessary?
- When your site is small, has low traffic and already loads quickly with page caching.
- When the slowness comes not from the database but from heavy images, too much JavaScript or a slow server.
- When you don't have a team to manage the server and configure Redis securely. A misconfigured Redis is a bigger risk than the speed it gains you.
Our experience
In our projects, we add a caching layer by measuring, not with a "Redis for every project" approach. First we look at where the slowness really comes from: a database query, a heavy page, or the front-end files? On corporate WordPress sites, page caching and front-end optimization are often enough; on this site, too, we work with a LiteSpeed server and LiteSpeed Cache. In custom software projects, we settle where sessions, queues and the cache will live at the architecture stage, that is, while designing the backend.
Frequently asked questions
Is Redis a database or a cache?
It can be both. Redis is a data store and, with persistence settings, can also be used as a primary data store. In web projects, though, its most common use is as a cache and auxiliary data store in front of the main database (MySQL, PostgreSQL, etc.).
Do I need a VPS to use Redis?
Usually, yes. Redis is server software and can't be installed on most shared hosting plans. Some hosting companies offer Redis as a ready-made service. If you want to run it on your own server, you need a VPS or a larger server. Managed Redis and Valkey services from cloud providers are another option.
Does the Redis license change affect me?
If you use Redis on your own website or in the background of your application, according to Redis's statements it generally does not. If you offer Redis to others as a managed service or distribute it with your product, you should review the license terms carefully.
Can Redis and Valkey be used interchangeably?
Because Valkey was derived from Redis 7.2.4, it's largely compatible in terms of core commands and client libraries. However, since the two projects develop separately, features specific to newer versions can differ. Test the features you use before switching.
Conclusion
Used in the right place, Redis is a flexible tool that can noticeably speed up websites and applications. It takes load off the main database for tasks such as caching, sessions and queues. But it isn't necessary for every project, and it calls for deliberate decisions about persistence, security and licensing.
If you'd like to assess the performance of your application or website together, take a look at our software and digital solutions and WordPress development services, or write to us.
Update (October 2026): Valkey 9.0 was released in October 2025. On Redis's official licenses page, the picture is unchanged as of October 2026: 7.2 and earlier are distributed under BSD 3-Clause, the 7.4.x versions under RSALv2/SSPLv1, and 8.0 and later with a choice of RSALv2, SSPLv1 or AGPLv3.
This article is for general information only and is not legal advice.
Sources12
- Redis — Redis FAQ (origin of the name, memory, maxmemory). redis.io
- Redis — Redis data types. redis.io
- Redis — Redis persistence. redis.io
- Redis — Redis security. redis.io
- Redis — Redis Adopts Dual Source-Available Licensing (20 March 2024). redis.io
- Redis — Redis is now available under the AGPLv3 open source license (1 May 2025). redis.io
- Redis — Licenses. redis.io
- Linux Foundation — Linux Foundation Launches Open Source Valkey Community (28 March 2024). linuxfoundation.org
- Valkey — Blog (8.0, 8.1 and 9.0 release announcements). valkey.io
- WordPress Developer Resources — WP_Object_Cache. developer.wordpress.org
- LiteSpeed Docs — LSCache for WordPress, Cache settings (Object Cache). docs.litespeedtech.com
- Laravel — Queues (11.x). laravel.com



