This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

How to Improve Your Site Performance Using Redis Cache on WordPress

Updated on December 20, 2021

8 Min Read
WordPress Redis Cache

Fast speed, high performance, stability, and great support have always been the main ingredients of Cloudways managed WordPress hosting. Our platform offers a PHP-powered stack with multiple cache layers that serve websites at an amazing speed.

Redis Object Cache (globally available on every Cloudways server as an optional install) is an important part of this cache layer.

In this article, you will learn to use it for your WordPress site and see the backend perform as fast as the frontend by using cache plugins like Breeze. For more advanced users, this article also covers how to use the Redis Object Cache with W3TC.

What Is Redis and How It Works?

By default, Cloudways servers use Memcached as an object cache, and it works just fine. WordPress Redis is a more advanced and rich implementation that can do all that Memcached does and then more.

Remote Dictionary Server (Redis) is an in-memory, persistent, key-value database, also known as a data structure server. One important factor that differentiates Redis from similar servers is its ability to store and manipulate high-level data types (common examples include lists, maps, sets, and sorted sets).

Redis’s caching mechanism, when combined with MySQL or MariaDB, speeds up WordPress database queries. Learn more about Redis on this article

Redis’ performance, simplicity, and micro-data structures manipulation allow it to perform significantly better than traditional relational databases. Enabling Redis on Cloudways servers requires a few steps, and this article will guide you in integrating Redis Object Cache support on your WordPress sites hosted at Cloudways.

How Does Redis Interact with WordPress Cache Plugins?

Unlike cache plugins, that run from inside the WordPress site, Redis is a server-side cache. WordPress cache plugins are made to accelerate the rendering of the website frontend by caching static versions of the pages that don’t run any code (for instance, the regular pages and posts that are served as static cached content).

Let’s say your WordPress site offers memberships, has protected content and discounts for members on the connected WooCommerce store (which also sells courses that are made with your preferred LMS for WordPress). All these plugins, plus their add-ons (that extend the plugins) may mean that there are up to 50 (or more) active plugins on your WordPress site.

We assume that you already have a properly configured WordPress cache plugin serving your pages. But at the backend, on your WordPress Admin area, things aren’t that fast because the dynamic content couldn’t be cached.

Managed WordPress Hosting Starting From $10/Month

Cut down server loads with Object Cache Pro, now offered for FREE on Cloudways, and enjoy speed boosts.

Integrating Redis will result in a noticeable improvement in the backend operations, drastically reducing the waiting time. Redis will cache and handle database queries and data structures in order to make your backend experience as fast as the frontend.

Before You Enable WordPress Redis Cache Support

Like every procedure that directly affects your server and your WordPress site, you should take precautions before enabling WordPress Redis cache support.

Back up Your Server

The first thing is to back up your server so that you have a safe restore point to revert to in case things go wrong.

Use a Clone/Staging Site to Test

You should test all site changes on a clone or staging environment. Once you are satisfied that everything is working as intended, you can simply “Push” the changes to the live site.

Prepare Each WordPress Install wp-config.php

To avoid conflicts when hosting your WordPress site at Cloudways, add the following lines to the wp-config.php file:

At the very top, just below the <?php tag on the top of the file, add this:

define('WP_CACHE', true);


And, at the first line on the Salt Keys Section of the file, add this:

define('WP_CACHE_KEY_SALT', '');


The WordPress Cache Salt Key ( in the example above) could be anything you like. It must be a unique key for every WordPress install on that server. This way we are sure Redis properly handles it. Using each install domain is the recommended option in this process.

Activating Redis on the Cloudways Platform

First, log in to the Cloudways Platform. Once in, navigate to Servers → Settings & Packages → Packages → Redis, and click Install.


The installation process will take some time. Once it finishes, you will see Redis has been installed on your server.


Method 1: Using Redis Object Cache Plugin

Now that the Redis is properly installed, the next step is to install and set up the integration plugin on your WordPress site. This is a simple and easy process with three steps: Install, Activate & Test.

Using Breeze Cache Plugin

Cloudways has developed a simple and powerful WordPress Cache plugin – Breeze – that works seamlessly with Redis.

Install and Set up Breeze

Breeze and Redis are two separate caching systems. As Breeze caches WordPress site contents to speed up the page speed to your visitors, WordPress Redis caches the queries, transients, and other data structures for the WordPress Admin.

Install Redis Object Cache Plugin

Log in to your WordPress site, go to WordPress Admin → Plugins → Add New. Search for “Redis Object Cache” and install the plugin.


Click Activate and you will be redirected to the main Plugins page. Verify that the Redis Object Cache plugin is active. Before Redis starts caching your site you have to connect the plugin to the server.


Now just go to WordPress Admin → Settings → Redis and click the Enable Object Cache button.


Activate and Verify That Redis Object Cache Is Working

This sometimes (but not always) will log you out. Just log back in, go back to the page and you will see that Redis is now connected.


You can also check at the WordPress Admin → Settings → Breeze → Database if Redis is caching your backend operations. When you have Redis Object Cache disabled, you will always have a few transient options to optimize:


After you have Redis Object Cache enabled, you will see those transient options are now 0 (zero), which means they’re being cached by Redis instead of being stored by WordPress.

Redis is working as you can see below:


When and Why You Should Flush Object Cache?

Normally we don’t need to flush the object cache, but sometimes it is the only option in cases where backend operations aren’t being registered such as a plugin activation/deactivation.

All you have to do is to go to WordPress Admin → Settings → Redis and then click the Flush Cache button. It’s also a good idea to flush/purge all other caches – WP, Varnish. Breeze has a dedicated option for purging Varnish that cleans out everything and recreates the cache from scratch.

If your plugin doesn’t have a dedicated purge option, go to the Cloudways Platform, navigate to Servers → Manage Services and click Purge for the Varnish to clean the Varnish cache at the server level.

Method 2: Using the W3TC Plugin

W3TC s a popular plugin that allows total control over every single aspect of system-wide caching. For most users, there are simply too many settings, each with many options and sub-options. When properly configured, it’s powerful and fast, however, many users now opt for easier solutions such as Breeze.

To set up Redis Object Cache to be managed by W3TC, you don’t have to install any additional plugin. When using W3TC, just go to the WordPress Admin → Performance → General Settings → Object Cache. First, select the checkbox Object Cache: Enable to activate the option, select Redis from the drop-down menu below it, and hit Save Settings & Purge Caches:


Test Redis Object Cache Response via Terminal

Next, you should test if everything is working fine. This is done by a simple command. For this launch the terminal. Note that for this to work properly, you need to enable SSH access to the application.


In the Terminal, access the server, type the line below, and hit Enter.

<code>redis-cli monitor</code>

If everything is properly configured you should get the message OK, followed by the pages that are being cached by Redis:


Like all customer-focused organizations, we value the feedback of our customers. Redis Object Cache is an outcome of the feedback we received from our customers. We already had Varnish and Memcached available at our arsenal, and a basic WordPress site hosted on Cloudways with Breeze can load in just 79ms and If your website is not hosted on Cloudways then you can request a Cloudways product demo to know about the product, its features, and how it works.

This tutorial guides you on configuring Redis Object Cache support to your WordPress sites hosted at Cloudways. The goal of this implementation is to speed up your backend operations by persistent caching queries, transients, and fundamental data structures that otherwise would use your WP and DB, and thus slowing down the websites. If you wish to clarify a specific point or would like to contribute to the discussion, please leave a comment below.

Frequently Asked Questions

Q: Is Redis good for WordPress?

A: Redis Object cache speeds up your WordPress load time each subsequent visit. The data serves faster next time the request generates, so the database doesn’t have to be queried again.

Q: How do I enable Redis cache in WordPress?

A: Go to your WordPress Dashboard > Plugin > Add New, search Redis Object Cache on the right search bar. Click on the install button, then activate the plugin after successful installation.

Q: What is Redis in WordPress?

A: Redis is a fast caching solution for server-side applications such as WordPress. Redis is an open-source key-value store that operates as an in-memory store and a cache.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Customer Review at

“Beautifully optimized hosting for WordPress and Magento”

Arda Burak [Agency Owner]

Fabio Fava

Fabio is a brazilian extreme air sports pioneer, flying paragliders since 1996 and aerobatics paragliders since 2000. He's producing websites and web content since 2005, using WordPress since 2010 and professionally since 2015.


Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!


Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!