1. Home
  2. CMS
  3. WordPress
  4. How to speed up WordPress with Redis Caching

How to speed up WordPress with Redis Caching

speed up WordPress with Redis Caching
How to speed up WordPress with Redis Caching


In this tutorial, we will teach you how to speed up WordPress with Redis Caching in a few simple steps.

What is Redis:

Redis is an in-memory database which you can use as a data store or cache. Redis is a good solution to speed up WordPress or any other software which supports Redis caching.

We have best fastest WordPress Hosting solutions.

speed up WordPress with Redis Caching

Here, we have listed all guide step by step for you;

Step 1: Installing Redis on a Linux VPS.

This guide assumes that WordPress was already installed on your system. For this reason we will skip over the WordPress installation step.

The installation of Redis is straightforward. If you have an Ubuntu VPS, execute the command below to Install Redis.

apt-get install redis-server


If you have a VPS, simply use the following command to install Redis.

yum install redis


Please ensure that you have EPEL (Extra Packages for Enterprise Linux) repo enabled on your server.

Start and enable Redis on system boot.

systemctl start redis.service
systemctl enable redis.service


Step 2: Install Redis PHP extension on a Linux VPS.

If you want to be able to use Redis as an object cache for your WordPress website, you will have to install the Redis PHP extension which should allow WordPress to communicate with Redis key-value store.

For Ubuntu execute the command below.

apt-get install php-redis


For CentOS execute the command below.

yum install php-pecl-redis


Step 3: Install Redis Caching Plugin in WordPress.

Log into your WordPress Dashboard and go to ‘Plugins > Add New’. Look for Redis and install the Redis Object Cache plugin from the list. After the installation is finished, go to ‘Plugins’ once more and activate the ‘Redis Object Cache’ plugin.

Now, go to ‘Settings > Redis’ and press on ‘Enable Object Cache’ so that object caching is enabled in WordPress.

The default configuration will work out of the box as the default Redis listening address is and the default listening port is 6379.

Step 4: Verify Redis caching on WordPress.

To see whether the WordPress caching works well with Redis, you can simply connect to your server with SSH and execute the command below.

redis-cli monitor


If you use the Redis monitor, you should be able to see every request which is processed by the Redis server; it should help you figure out what is happening to the database. The output will look similar to the one below.

# redis-cli monitor
1510415208.863435 [0] "PING"
1510415208.865491 [0] "GET" "wp_:default:is_blog_installed"
1510415208.870259 [0] "GET" "wp_:options:notoptions"
1510415208.870433 [0] "GET" "wp_:options:alloptions"
1510415208.871197 [0] "GET" "wp_:site-options:1:notoptions"
1510415208.875126 [0] "GET" "wp_:options:uninstall_plugins"
1510415208.882241 [0] "GET" "wp_:wordfence:alloptions"
1510415208.913368 [0] "GET" "wp_:site-options:1:notoptions"
1510415208.913547 [0] "GET" "wp_:site-options:1:notoptions"
1510415208.916283 [0] "GET" "wp_:site-options:1:notoptions"
1510415208.916434 [0] "GET" "wp_:site-options:1:notoptions"
1510415208.947299 [0] "GET" "wp_:site-options:1:notoptions"
1510415208.947480 [0] "GET" "wp_:options:can_compress_scripts"
1510415208.947637 [0] "GET" "wp_:site-options:1:notoptions"
1510415208.954565 [0] "GET" "wp_:posts:last_changed"


Enabling WordPress caching with Redis is pretty simple to do, this should be all.

We hope that this tutorial helped you move your WordPress to a new domain name. If this tutorial helped you, then please don’t forget to share it. We appreciate all retweets, likes, and +1s. Lastly, let us know about your experience and/or questions by leaving a comment below.
One more thing…
Want more detailed hosting, best VPS, Free SSL installation, WordPress hosting tutorials? Check out our hand-picked guides;

Updated on December 23, 2018

Was this article helpful?

Related Articles

Leave a Comment

[apsl-login-lite login_text='Please login with a social account']