Elasticache Redis For Magento

Redis is used for magento cache storage which will lead to better web

Login Server (Amazon Linux):

#yum install git
#Installing phpredis PHP Extension for Redis
#git clone git://github.com/owlient/phpredis
#cd phpredis
#make && make install

Enabling phpredis

#vim /etc/php.d/redis.ini

Get Colins Magento Redis code

#bash < <(wget -O - https://raw.github.com/colinmollenhour/modman/master/modman-installer)
#cd /var/www/magento
#modman init
#modman clone git://github.com/colinmollenhour/Cm_Cache_Backend_Redis.git

Configuring it with Magento:

#vim /var/www/magento/app/etc/local.xml


<force_standalone>0</force_standalone>  <!-- 0 for phpredis, 1 for standalone PHP -->
<automatic_cleaning_factor>0</automatic_cleaning_factor> <!-- Disabled by default -->
<compress_data>1</compress_data>  <!-- 0-9 for compression level, recommended: 0 or 1 -->
<compress_tags>1</compress_tags>  <!-- 0-9 for compression level, recommended: 0 or 1 -->
<compress_threshold>20480</compress_threshold>  <!-- Strings below this size will not be compressed -->
<compression_lib>gzip</compression_lib> <!-- Supports gzip, lzf and snappy -->


Restart Apache

#rm -rf /var/www/magento/var/cache/*

There should not be any files inside the above directory after few minutes of browsing the site.

Installing phpRedisAdmin

#git clone https://github.com/ErikDubbelboer/phpRedisAdmin.git
#cd phpRedisAdmin
#curl -s http://getcomposer.org/installer | php
#php composer.phar install
#vim phpRedisadmin/includes/config.inc.php

$config = array(
'servers' => array(
'name' => 'Elasticache Redis', // Optional name.
'host' => 'example-redis.0001.cache.amazonaws.com',
'port' => 6379,
'filter' => '*'

[Moved Installed dir to documentroot]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s