header

Magento 1.x Software Support Notice

For Magento Commerce 1, Magento is providing software support through June 2020. Depending on your Magento Commerce 1 version, software support may include both quality fixes and security patches. Please review our Magento Software Lifecycle Policy to see how your version of Magento Commerce 1 is supported.

For Magento Open Source 1.5 to 1.9, Magento is providing software security patches through June 2020 to ensure those sites remain secure and compliant. Visit our information page for more details about our software maintenance policy and other considerations for your business.

Using Redis With Magento Community Edition (CE) or Enterprise Edition (EE)

Contents

Overview

Redis is an open source, Berkeley Software Distribution (BSD) licensed, advanced key-value store that can optionally be used in Magento for backend and session storage. In fact, you can replace memcached with Redis.

Following are some of the benefits Redis provides for Magento implementations:

Requirements for Using Redis with Magento

The following Magento editions support Redis session and backend caching:

The preceding Magento editions support Redis server version 2.6.9 and later available from redis.io.

In addition, you can optionally use the Redis extension for PHP version 2.2.3 or later if you're using Redis for backend caching; however, Magento works without this extension.

Configuring Redis

To use Redis with Magento, you must configure Magento to use Redis and you must install and configure the Redis server. These tasks are discussed in the following sections:

Configuring Magento To Use Redis

To use Redis with Magento, you only need to install and configure the Redis server. The integration between Redis and Magento is already included with Magento CE 1.8 and EE 1.13 and later versions. All you need to do is configure it.

Important: The Cm_RedisSession module in CE 1.8 is disabled by default. Magento disables the module to avoid unnecessary connection tries to Redis when you choose to use file, database, or a different session storage method.

To enable Magento to use Redis, perform the following tasks:

  1. Enable the Cm_RedisSession module.
    1. Open magento-install-dir/app/etc/modules/Cm_RedisSession.xml in a text editor.
    2. Change the value of <active> to true.
    3. Save your changes to Cm_RedisSession.xml and exit the text editor.
  2. Modify magento-install-dir/app/etc/local.xml.
    For configuration information, see the sample provided with Magento in magento-install-dir/app/etc/local.xml.additional and also see the Readme (session) and Readme (backend).
  3. Flush the Magento cache in any of the following ways:
    • If you have access to the file system as the owner of the files in the Magento installation directory, change to that directory and enter rm -rf var/cache.
    • Log in to the Admin Panel as an administrator. Click System > Cache Management, then click Flush Magento Cache at the top of the page.

Installing and Configuring the Redis Server

Get Redis server version 2.6.9 or later and configure it according to their documentation.

You can optionally install the Redis extension for PHP version 2.2.3 or later as well, but Magento functions without it.

Getting Support for Redis

Important: Colin Mollenhour, the original author of Redis, does not provide support for Magento implementations. You can get support for Magento implementations in the following ways:

Magento edition How to get help
Magento CE and Magento EE
Magento CE Submit bug reports
Magento EE only Submit bug reports

For More Information

For more information about using Redis with Magento, see:

Acknowledgment

Magento acknowledges the contributions of Colin Mollenhour in providing the code for the Magento implementation of Redis.