How to implement Redis in WordPress?

HINT: If you have a CMS hosting account (WordPress Performance, Magento Business, Joomla Express, Drupal Express, etc.), Combell will automatically choose the best caching method for you and configure it. You do not need to go through this procedure.

REDIS is the preferred method for caching WordPress if the backend and/or the frontend are slow

To implement REDIS in WordPress follow this tutorial:

  1. First make sure you Activate Redis caching from control panel
  2. Log into the backend of WordPress
  3. Install the following plugin: Redis Object Cache (
  4. Activate the plugin but do not yet click on the “Enable Object Cache” button in the settings section of the plugin control.Now, as you see, this plugin has a settings screen, but you can not enter the IP address and port of your REDIS. Therefore, we should add the following to the wp-config.php via ssh:
    * REDIS config
    define('WP_REDIS_HOST', '');
    define('WP_REDIS_PORT', '10039');
    define('WP_REDIS_PASSWORD', 'password');
    define('WP_REDIS_MAXTTL', '86400');

    You are adding this block of code just above this line:

    /* That's all, stop editing! Happy blogging. */
  5. Now back in the Settings section of your WordPress plugin, click on the “Enable Object Cache” button.
    Now your Redis should work.

Checking Redis

Then check if the Redis Cache is being correctly filled. This is done as follows via the Redis-CLI:

Execute this command:

redis-cli -h redisipadress -p redisportnumber


redis-cli -h -p 10000

This is what will appear>

Now enter the word “AUTH” followed by the password of the Redis instance and press enter. This looks like this:> AUTH ***************

You should now get an “OK” back. Respond with executing this command: “keys *” like so:> keys *

If Redis is configured properly, you see an output similar to the following:

1) "zc:k:f01_B95179DADADD876876ADDaD87630E9E"
2) "zc:ti:f01_BLOCK_SLIDE2"
3) "zc:k:f01_Zend_LocaleC_nl_NL_country_MR"
5) "zc:k:f01_6ADDaDA9B2A0BB12371C0A5FB79E"
6) "zc:k:f01_CMS_BLOCK_BLOCK_LEFT_TOP_1_1"
7) "zc:k:f01_Zend_LocaleC_sv_SE_language_sv"
Updated on 8 March 2020

Was this article helpful?

Need support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact support

Couldn't find a solution?


Our specialists are available 24/7 to provide you with free support. Feel free to contact Joachim and his colleagues via e-mail or by phone.

Joachim Coessens Specialist Support