How to implement Redis in Drupal 7?

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.

ATTENTION: This tutorial can NOT be combined with an implementation of Memcached in Drupal 7

To implement Redis as easily as possible in Drupal 7, proceed as follows:

  1. First make sure you Activate Redis caching from the control panel
  2. Login in the backend. This can be done by generating a single sign-on link via drush.
    drush uli -l

    You type this in the root directory of the Drupal installation. Here you get a link that looks approximately like this:

    Please note that this link is valid only once. If you logged out, you will have to generate a new link.

  3. Install the “Redis” module
    1. Once logged in, go to “Modules” => “Install new module”.
    2. Go to and please copy the link of the zip file of the latest release of Drupal 7.
    3. Then go back and paste this URL into the text field “Install from a URL” and click “Install”
  4. Activate the module
    1. Click “Modules” in the backend of Drupal. Now search for “Redis” from the list of modules.
    2. Now switch on the “Redis” module and click “Save settings” (button on the left bottom)
  5. Adjusting the configuration of the Redis module
    1. Change to the sites/default/ directory.
    2. Add the following to the bottom of the file settings.php:
      /* Redis config
       * Please leave the settings below untouched
        $conf['cache_backends'][]            = 'sites/all/modules/redis/';
        $conf['cache_class_cache']           = 'Redis_Cache';
        $conf['cache_class_cache_menu']      = 'Redis_Cache';
        $conf['cache_class_cache_bootstrap'] = 'Redis_Cache';
        $conf['lock_inc'] = 'sites/all/modules/redis/';
        $conf['path_inc'] = 'sites/all/modules/redis/';
        $conf['redis_client_host'] = ‘';
        $conf['redis_client_port'] = 10000;
        $conf['redis_client_password'] = "XD23SggF";

    Here you need to replace the IP address, port and password, of course, by the Redis IP, port number and password.

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_B95179D8427D4CD3A6E015530E9E4"
2) "zc:ti:f01_BLOCK_SLIDE2"
3) "zc:k:f01_Zend_LocaleC_nl_NL_country_MR"
5) "zc:k:f01_A9B2A0BB16F05FAA2371C0A5FB79E"
6) "zc:k:f01_CMS_BLOCK_BLOCK_LEFT_TOP_1_1"
7) "zc:k:f01_Zend_LocaleC_sv_SE_language_sv"


Updated on 7 February 2023

Was this article helpful?

Need Support?
Can't find the answer you're looking for?
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