Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared Managed Cloud India
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
Best lists Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Speed & performance · Explainer

Redis vs Memcached for WordPress

Short answer

Redis is the better pick for most WordPress sites because it stores more data types, can save data to disk, and has a widely used WordPress plugin with a settings screen. Memcached is a simpler key-value cache that still works well when your host already runs it. Both replace the short-lived WordPress object cache with a persistent one, so repeated database work is skipped.

Key takeaways

  • Redis stores strings, hashes, lists, sets, sorted sets, streams and JSON, while Memcached stores simple key-value pairs.
  • WordPress object cache is non-persistent by default, so cached data dies at the end of each request without Redis or Memcached.
  • Redis can save data to disk with RDB snapshots and AOF logs, while Memcached keeps data only in memory.
  • Memcached dates to 2003 and was built to ease database load on busy dynamic sites.
  • Check with your host first, because many hosts offer only one of the two, and that decides the choice.

What is the core difference between Redis and Memcached for WordPress?

Redis is a data store with many data types and optional disk saving, while Memcached is a simpler in-memory key-value cache.

That sentence drives the choice. Redis can hold strings, hashes, lists, sets, sorted sets, streams and JSON, according to Redis. Memcached stores a key and a value, and nothing more complex.

Both do the same job inside WordPress. They keep answers to repeated database questions in memory, so WordPress reads them from RAM instead of asking the database again.

The WordPress developer docs say the built-in object cache is non-persistent by default, so data lives only for one request unless you add a persistent backend (WordPress Developer Resources).

Neither tool is a page cache. A page cache stores finished HTML pages, while an object cache stores small pieces of data such as query results and options. If you want faster pages for visitors, start with our guide on how to speed up WordPress.

What is Redis, and how does it work with WordPress?

Redis is an in-memory data store that WordPress can use as its persistent object cache.

Redis stands for Remote Dictionary Server, and its default port is 6379, according to the Redis quick-start guide. WordPress talks to it through a plugin that drops an object-cache.php file into wp-content, which replaces the built-in cache with a Redis backend.

The Redis Object Cache plugin supports Predis, PhpRedis, Relay, replication, sentinels and clustering, plus WP-CLI commands. Its latest changelog entry shown as of November 2026 is version 3.0.1. That range of clients matters because hosts differ in which PHP extension they install.

Redis also offers more than caching. Its data types include hashes for grouped fields, sets for unique values, and sorted sets for ranked lists, according to Redis. WordPress itself uses mainly simple key-value storage, so most sites never touch those extras, but plugins and custom code can.

How Redis keeps data safe

Redis keeps all data in memory for fast access, and it can also write data to disk.

It offers two disk formats, RDB snapshots taken at set times and an AOF log that records every write, according to Redis. A restart after a crash can then reload data instead of starting with an empty cache.

That does not make Redis a database backup. The cache can still be flushed, and stale entries must be rebuilt.

What is Memcached, and how does it work with WordPress?

Memcached is a distributed in-memory cache that WordPress can use as its persistent object cache.

Memcached is a high-performance, distributed memory object caching system, built to speed up dynamic web applications by easing database load, according to memcached.org. It was originally developed by Brad Fitzpatrick for LiveJournal in 2003, which makes it the older of the two tools.

WordPress connects to it through the Memcached Object Cache plugin, which needs a memcached server and the PECL memcache extension for PHP. The plugin page gives the default server as 127.0.0.1:11211, and it asks you to copy object-cache.php into wp-content by hand.

Memcached shines when many servers share one cache. Its own site explains that 50 web servers with separate caches would hold only 64 MB of usable cache, while the same servers sharing a memcached pool would hold 3.2 GB (memcached.org). That shared pool is the reason large sites picked it early.

What Memcached does not do

Memcached stores data only in memory, with no built-in way to save it to disk.

A restart empties the cache, and WordPress rebuilds entries as pages are requested. That is normal for a cache, but it means a restart after a busy period brings a short spell of slower pages while the cache warms up again.

Memcached also has no data types beyond a key and a value.

How do Redis and Memcached compare side by side?

The table below puts the facts that matter for WordPress next to each other.

FeatureRedisMemcached
Core ideaIn-memory data store with many data typesDistributed in-memory key-value cache
Data typesStrings, hashes, lists, sets, sorted sets, streams, JSONKeys and values only
Disk savingRDB snapshots and AOF logsNone built in
Default port637911211
WordPress pluginRedis Object Cache, with a settings screenMemcached Object Cache, set up by hand
PHP extensionPhpRedis 6.3.0 stable, released 6 November 2025, needs PHP 7.4.0 or newerPECL memcache extension
Scaling styleReplication, sentinels and clusteringShared pool across many servers

One row deserves a note. The Redis extension release date and PHP need come from PECL, checked November 2026. The Memcached origin and shared-pool example come from memcached.org.

The plugin row matters most in daily use. Redis Object Cache gives you a settings screen, diagnostics and a flush button in the admin area. Memcached Object Cache has no settings screen, so you edit wp-config.php and move files by hand.

Which one is faster for a WordPress site?

For a normal WordPress site, the speed gap between Redis and Memcached is too small to decide the choice.

Both read from memory, and both skip the same database queries. Redis describes its own access as sub-millisecond, according to Redis. Memcached was built for the same job, and its site stresses fast memory access across a whole cluster of servers.

What changes speed is whether the cache is used well, not which of the two you picked. A site with slow queries, too many plugins, or a weak host stays slow with either cache.

The real speed question is hit rate: how often WordPress finds what it needs in the cache. A high hit rate means few database trips. A low hit rate means the cache is too small, flushed too often, or filled with data that is never reused.

When should you pick Redis for WordPress?

Pick Redis when you want the widest choice of hosts, plugins and features.

Redis fits these cases:

  • Your host offers Redis, or you run your own server and can install it.
  • You want a settings screen and diagnostics in the WordPress admin area.
  • You want data to survive a restart through RDB snapshots or AOF logs.
  • You run WooCommerce or a membership site, where many repeated queries hit the same data.
  • You may later use the same store for queues, sessions or rate limits.

Redis also scales in more ways. The plugin page lists replication, sentinels and clustering, so a growing site can add a second server or a failover copy without changing its WordPress code (WordPress.org).

One more point in its favour is activity. The Redis plugin changelog shows version 3.0.1 as its latest entry as of November 2026, while the Memcached plugin page shows version 4.0.0, updated 8 November 2022.

When should you pick Memcached for WordPress?

Pick Memcached when your host already runs it, or when you want the simplest possible cache.

Memcached fits these cases:

  • Your host includes Memcached and does not offer Redis.
  • You run many web servers and want them to share one memory pool.
  • You only need simple key-value storage, with no hashes, sets or disk saving.
  • You prefer a small tool with a narrow job over a larger one with extras.

The setup is more manual. You install the server, add the PECL memcache extension, copy object-cache.php into wp-content, and add a unique WP_CACHE_KEY_SALT value to wp-config.php, according to the Memcached Object Cache plugin. That salt stops two WordPress installs on one server from reading each other's cached data.

Do not switch a working Memcached setup to Redis just for fashion. If your cache hit rate is high and your host supports Memcached well, the gain from switching is small and the risk of a bad move is real.

How much do Redis and Memcached cost for WordPress?

Both tools are free to install, and the cost comes from hosting, memory and management.

Redis and Memcached are open source, so there is no licence fee for the software itself. The cost is the server RAM they use, plus the time to install and watch them. More cache memory means more cached data, but it also means a larger hosting bill.

Managed Redis adds a price on top. Redis offers a free account and a free database in its quick-start guide, which is enough to learn on, according to Redis. Paid managed plans charge by memory and features, and those prices change, so check the vendor page as of November 2026 before you budget.

For most WordPress owners the cheapest path is the host bundle. Many managed hosts include one of the two in the plan price, so ask your host which one is included before you pay for a separate cache server.

How do you set up Redis or Memcached on WordPress?

Ask your host first, then follow the plugin path for the tool your host supports.

Most managed hosts install the server and the PHP extension for you. If yours does not, you need server access, and the job moves from a WordPress task to a server task. Check the PHP version guide too, because the PHP extension must match your PHP version.

For Redis, the usual path is:

  1. Confirm Redis is running and note its host and port, usually port 6379.
  2. Install the Redis Object Cache plugin from WordPress.org.
  3. Open the plugin screen and enable the object cache.
  4. Load a few pages, then check the plugin diagnostics for a connection and a hit rate.

For Memcached, the usual path is:

  1. Confirm memcached is running and note its host and port, usually port 11211.
  2. Install the PECL memcache extension for PHP.
  3. Copy object-cache.php from the plugin into wp-content by hand.
  4. Add a unique WP_CACHE_KEY_SALT value to wp-config.php.

Never run both at once. Two object-cache drop-ins fight over the same job, and WordPress loads only one. Pick one, remove the other drop-in, and flush the cache after the change.

How do you check that object caching is working?

Check the plugin screen first, then watch the hit rate and the database load.

With Redis, the plugin screen shows the connection state, the hit rate and the memory used. A rising hit rate over a day of normal traffic means the cache is filling with useful data. A hit rate stuck near zero means the cache is empty, misconfigured, or flushed too often.

With Memcached, there is no settings screen, so use a monitoring plugin such as Query Monitor to watch database queries. Fewer repeated queries for the same page is the sign the cache is doing its job.

Transients give you a second check. WordPress stores transients in the object cache when a persistent cache is active, and in the options table when it is not, according to the Transients handbook.

A transient name must be 172 characters or fewer, and a transient may vanish before its set expiry time, so never treat it as permanent storage.

If pages feel no faster, look beyond the cache. Slow PHP workers, a slow database, or a weak host can hide the gain. Our guide to what PHP workers are explains one common limit.

What mistakes should you avoid?

The most common mistakes come from treating an object cache as a fix for every speed problem.

Avoid these errors:

  • Installing both Redis and Memcached at once, so two drop-ins conflict.
  • Expecting an object cache to replace a page cache, a CDN, or image sizing.
  • Flushing the cache on every small change, which keeps the hit rate low.
  • Sharing one cache server between sites without a unique key salt or prefix.
  • Caching data that must always be fresh, such as a live cart total.
  • Skipping the host question and installing a tool your host does not support.

Page caching is a separate layer. Cloudflare cache rules for WordPress cover that layer, and they do not replace the object cache, or the other way round.

Finally, test after a change. Load the home page, a post, and a category page, then check that each one shows the right content.

Frequently asked questions

Can I use Redis and Memcached together on one WordPress site?

No, you should use only one. WordPress loads a single object-cache drop-in, so two backends conflict and only one will actually run. Pick the one your host supports, remove the other drop-in file, and flush the cache after the change so no stale entries remain.

Does Redis or Memcached replace a caching plugin such as WP Rocket or LiteSpeed Cache?

No. Redis and Memcached provide an object cache, which stores small pieces of data such as query results. A caching plugin usually adds page caching, which stores finished HTML pages, plus file and browser caching. Many sites use both layers together, and each one solves a different part of the speed problem.

Will Redis or Memcached speed up a small blog with little traffic?

Only a little. A small blog has few repeated database queries, so the cache has little work to save. The gain grows with traffic, logged-in users, WooCommerce orders, and complex queries. For a small blog, good hosting, a page cache, and sized images usually matter more than an object cache.

What happens to the cache when the server restarts?

Memcached loses all cached data on a restart, because it stores data only in memory. Redis can reload data from disk if RDB snapshots or AOF logging are turned on, so it recovers faster. In both cases the site keeps working, and the cache refills as visitors request pages.

Do I need Redis or Memcached on shared hosting?

Usually not, and many shared hosts do not offer either one. Shared hosting suits small sites where the built-in WordPress cache and a page cache are enough. Ask your host what it includes first. If it offers one of the two, use that one rather than paying for a separate cache server.

Sources

  1. What is Redis? Redis
  2. Redis as an in-memory data structure store quick start guide Redis
  3. About Memcached memcached.org
  4. WP_Object_Cache WordPress Developer Resources
  5. Redis Object Cache WordPress.org
  6. Memcached Object Cache WordPress.org
  7. Transients WordPress Developer Resources
  8. PECL Package: redis PECL

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

WPLegible editors

Researched from the primary sources listed above and checked against our editorial rules. About the site · How we test