Configure Redis for Drupal Application

Before you proceed please follow the steps on this TUTORIAL in order to enable REDIS via your Cpanel. After that follow the steps below to configure REDIS for your Drupal application:

How to configure REDIS

  1. Login to your DRUPAL admin panel.

  2. Navigate trough the following steps - Drupal Admin area >> Extend >> + Install new module >> Install from a URL >> >> Install.

For installation URL please choose: (or a newer version for Redis if available)

  1. Click Enable newly added modules and enable Redis.

  1. Edit Drupal settings file at ./sites/default/settings.php and add these lines at the bottom of the file:

$conf['redis\_client\_interface'] = 'Predis'; $conf['redis\_client\_host'] = 'hostname'; $conf['redis\_client\_port'] = port; $conf['redis\_client\_password'] = 'password'; $conf['lock\_inc'] = 'sites/all/modules/contrib/redis/'; $conf['cache\_backends'][] = 'sites/all/modules/contrib/redis/'; $conf['cache\_default\_class'] = 'Redis\_Cache';

PS: The variables you should edit: hostname, port, password are found on your Cpanel > Redis information.

  1. Clear your Drupal cache: Admin >> Configuration >> Performance >> Clear all caches and then visit the status report page: Admin >> Reports >> Status report.

If everything is correctly set the line next to REDIS should show -- Connected