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 · Guide

How to Set Up Redis Object Cache in WordPress

Short answer

To set up a Redis object cache in WordPress, first confirm your host runs a Redis server. Then install the free Redis Object Cache plugin, go to Settings → Redis, and click Enable Object Cache. Add the WP_REDIS_ constants your host gives you to wp-config.php, then check the hit ratio on the plugin settings screen to confirm it works.

Key takeaways

  • WordPress has an object cache by default, but it only lives for one request unless a persistent drop-in is added.
  • The Redis Object Cache plugin adds an object-cache.php drop-in to wp-content when you click Enable Object Cache.
  • Your host must run a Redis server first, since the plugin refuses to enable when Redis is unreachable.
  • Connection details go in wp-config.php as WP_REDIS_ constants, with a unique prefix per site.
  • Check the hit ratio in Settings → Redis or run wp redis status to confirm the cache is working.

What is a Redis object cache in WordPress?

A Redis object cache stores WordPress database results in Redis memory so repeat requests skip the database.

WordPress already has an object cache, but by default it lives in PHP memory for one request only and is emptied at the end of that request, according to the WP-CLI cache documentation on Developer.WordPress.org.

A persistent drop-in changes that. Placing an object-cache.php file in wp-content replaces the built-in cache class, as the WP_Object_Cache reference on Developer.WordPress.org explains, so cached objects survive between requests.

Redis is the storage behind the drop-in. The Redis Object Cache plugin on WordPress.org describes itself as a persistent object cache backend powered by Redis, with support for Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.

What do you need before you start?

You need a running Redis server, a host that allows it, and an admin login with a fresh backup.

ItemMinimumWhere to check
Redis serverRunning on your host or serverHosting panel or support
WordPress4.6 or newerDashboard → Updates
PHP7.2 or newerSite Health → Info → Server
BackupFull files and database backupYour backup plugin

The WordPress and PHP minimums come from the plugin changelog on WordPress.org, which lists WordPress 4.6 or newer and PHP 7.2 or newer. WordPress.org itself recommends PHP 8.3 or newer as of November 2026, so treat the plugin minimums as a floor, not a target.

Set aside 15 to 30 minutes. Most of that time goes to checking with your host, since the plugin install itself takes about two minutes.

If you are still choosing a backend, our Redis vs Memcached guide compares the two options for WordPress.

How do you check whether your host already offers Redis?

Check your hosting panel for a Redis or object cache switch, or ask your host's support team.

Some managed hosts sell Redis as an add-on. Kinsta's documentation lists Redis caching at $100 per month per site as of November 2026, and its docs describe the add-on as a way to cut database load and response time.

Other hosts include Redis in higher plans, offer Memcached instead, or offer neither. If your plan has no Redis server, the plugin has nothing to connect to, so confirm this before you install anything.

Quick checks you can run first:

  • Look in wp-content for object-cache.php. That file means a drop-in is already active.
  • Search wp-config.php for WP_REDIS_. Those lines mean a Redis setup already exists.
  • Ask support one question: "Do you run a Redis server I can use, and what are the host, port and password?"

How do you install the Redis Object Cache plugin?

Install the free Redis Object Cache plugin from WordPress.org, then activate it from the Plugins screen.

  1. Go to Dashboard → Plugins → Add New.
  2. Search for “Redis Object Cache” and find the plugin by Till Krüss.
  3. Click Install Now, then Activate.
  4. On a multisite network, choose Network Activate instead, as the plugin changelog advises.

Installing the plugin alone changes nothing. The cache only starts when you enable the drop-in in the next step, and the plugin refuses to enable it when Redis is unreachable, according to its changelog.

Version 3.0.1 is the latest release listed on WordPress.org as of November 2026.

How do you enable the object cache?

Go to Settings → Redis in the dashboard and click Enable Object Cache.

The plugin copies an object-cache.php drop-in into wp-content. That drop-in loads before normal plugins, so you will not find an on-off switch for it on the Plugins screen.

If Redis is unreachable, the plugin shows an error instead of enabling, as its changelog notes for version 2.4.0. Check the host, port and password with your host before you try again.

An object cache is one layer of speed. A page cache is a separate layer, and our guide to speeding up WordPress explains how the layers fit together.

How do you connect WordPress to your Redis server?

Add WP_REDIS_ constants to wp-config.php with the host, port, password and prefix your host gives you.

Many managed hosts connect the plugin for you, so you may not need this step at all. If your host leaves the setup to you, add the lines below to wp-config.php, using the values from your host.

define( 'WP_REDIS_HOST', '127.0.0.1' );
define( 'WP_REDIS_PASSWORD', 'paste-the-password-here' );
define( 'WP_REDIS_PREFIX', 'mysite' );

Add a WP_REDIS_PORT line as well if your host gives you a port number. The values above are examples only, so replace them with the details from your host.

ConstantWhat it sets
WP_REDIS_HOSTAddress of the Redis server
WP_REDIS_PORTPort of the Redis server
WP_REDIS_PASSWORDPassword for the Redis server
WP_REDIS_PREFIXPrefix that keeps one site's keys apart from another site's
WP_REDIS_DISABLEDSet to true to switch the cache off without removing the drop-in

Give each site its own prefix or database number when sites share one Redis server. The plugin supports a per-site prefix and selective flushing, which exist so sites sharing one Redis server can stay separate.

How do you check that Redis is working?

Open Settings → Redis and look for a connected status, a hit ratio, and hit counts that rise as pages load.

The plugin adds a dashboard widget with metrics and an admin bar node that shows the hit ratio, according to its changelog. A ratio above zero that climbs over time means objects are being served from Redis instead of the database.

For a command-line check, run wp redis status with WP-CLI. The changelog notes that this shows full diagnostics, and the WP-CLI cache docs on Developer.WordPress.org list wp cache type as the command that names the object cache in use.

Query Monitor can confirm the drop in database queries. The plugin added support for Query Monitor in version 2.0.0, and Query Monitor's own WordPress.org page says it shows database queries grouped by the plugin, theme or function behind them.

When should you flush the object cache?

Flush it when cached data looks stale, after moving a site, or when your host or developer asks you to.

Flush from Settings → Redis or run wp cache flush. The WP-CLI cache docs list wp cache flush as the command that flushes the object cache.

Flushing deletes cached objects, so the first visits after a flush rebuild them and run slower. Treat a flush as a reset for a specific problem, not as regular upkeep.

How much does a Redis object cache cost?

The plugin is free, but the Redis server behind it usually is not.

Kinsta's documentation lists its Redis add-on at $100 per month per site as of November 2026. Other hosts bundle Redis into a plan, and running your own server costs whatever that server costs, plus your time to keep it updated.

Start with the free plugin and your host's Redis option before paying for a separate server. A small site with mostly logged-out visitors gains more from page caching than from an object cache.

Does every WordPress site need Redis?

No, since sites with mostly logged-out visitors and few database queries gain little from it.

Redis helps most where every visit runs fresh database queries, such as shops, membership sites and forums. A small blog with a page cache already serving static HTML to logged-out visitors may see no visible change.

Check Query Monitor's query count before and after enabling. If the count barely moves, the cache is not your bottleneck.

What mistakes should you avoid?

The main mistakes are enabling the cache with no Redis server, sharing one database across sites, and expecting it to replace page caching.

  • Do not enable the drop-in before Redis is running. The plugin refuses when Redis is unreachable, so a failed enable usually means the server details are wrong.
  • Do not share one Redis database across sites without a unique prefix. One site's flush can then clear another site's keys.
  • Do not expect object caching to replace page caching. WP Super Cache's WordPress.org page explains that it serves static HTML files instead of running WordPress PHP scripts, which is a different job from caching database objects.
  • Do not edit wp-config.php without a backup. One wrong character in that file can lock you out of the dashboard.
  • Do not skip the metrics check after a host move. A moved site can look fine while quietly running with no cache at all.

If the cache is working but the site is still slow, the host may be the limit. Our guide on whether hosting affects WordPress speed explains what to check next.

Frequently asked questions

Do I need a Redis server before installing the plugin?

Yes. The plugin is only the connector between WordPress and Redis, so it needs a running Redis server to talk to. Ask your host whether Redis is included in your plan or sold as an add-on, and get the host, port and password before you install anything.

Is the Redis Object Cache plugin free?

Yes, the plugin itself is free on WordPress.org. The cost comes from the Redis server behind it. Some hosts include Redis in a plan, while others sell it as an add-on, so the total cost depends on your host rather than on the plugin.

What is the object-cache.php drop-in?

It is a file the plugin places in your wp-content folder that replaces the built-in object cache class with a Redis-backed one. It loads before normal plugins, so it cannot be switched off from the Plugins screen. Disable it from Settings → Redis instead.

Will a Redis object cache replace my page cache plugin?

No. An object cache stores database results so each request costs less, while a page cache stores finished HTML pages so some requests are skipped entirely. Most sites benefit from both, since they solve different parts of the same slowdown.

What should I do if enabling the cache fails?

Check the Redis details first, since the plugin refuses to enable when Redis is unreachable. Confirm the host, port and password with your host, check that the Redis service is running, and look at the error shown on the Settings → Redis screen for the exact cause.

Sources

  1. Redis Object Cache WordPress.org
  2. wp cache – WP-CLI Command WordPress Developer Resources
  3. WP_Object_Cache::get() – Method WordPress Developer Resources
  4. Requirements WordPress.org
  5. WordPress Hosting Add-Ons Kinsta

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