Speed up Wordpress website using Redis cache

Written on 29 July 2015

Caching is a good way to speed up web application. I have used some Wordpress cache plugin like "Wordpress-Super-Cache" but not realy good as I expected.
I try to to speed up Wordpress then I realize that Redis is very good for that purpose.

How to do ?

First, Install Redis-server , then make Wordpress word with Redis. But you don't need build from scratch. You just need do some easy and simple config.

Install Redis-server

  • For Debian base disto
sudo apt-get intall redis-server  

* For Redhat/CentOS

sudo yum install redis-server  

Install Php5-redis

  • Debian\Ubuntu
sudo apt-get install php5-redis  
  • For Redhat/CentOS
sudo yum install php5-redis  

Now Cache Wordpress using Redis

Edit index.php file in wordpress directory to use Redis:


Then download index-wp-redis.php

wget https://raw.githubusercontent.com/BenjaminAdams/wp-redis-cache/master/index-wp-redis.php  

Mostly done

Now, Wordpress has worked with Redis but you must may way want to manage Redis with a Wordpress plug in.
To install Wp-resdis-cache:

wget https://github.com/BenjaminAdams/wp-redis-cache/archive/master.zip -O wp-redis.zip  
unzip wp-redis.zip  
cd wp-redis-cache-master/  
mv wp-redis-cache /path/to/wp-content/plugin/  

Done Now go to admin page and go to Setting > WP-Redis-Cache to setting, and test new speed of your Wordpress site.

Read more on Wordpress Redis