I've been looking online for a while and I haven't seen anything on setting up Drupal to use Redis for session handling. I've found tutorials and blogs about settings Redis up as a replacement for Memcached for caching.

Anyone know how to do this? I was hopping there was something in the $conf variable in the settings.php file that would allow me to override where sessions are stored and retrieved.

Thanks for any help in advance,


a quick google search: http://lmgtfy.com/?q=drupal+redis+sessions

and the 2nd result talks about redis session handling: https://www.drupal.org/node/2250195

from that issue thread i recommend looking Session Proxy. This allows you to override the default session handler by Drupal -- which is explained in the above issue:

This is because Drupal will override your session handler and use its own, it goes straight to the database. I'd recomend that you try using this module: https://drupal.org/project/session_proxy

Session Proxy provides the following, I believe your attempting #2:

ships three different session managing implementations:

  1. Database session handling: core default, ported to the object oriented API. It comes with an additional SQL query done more than core session.inc default implementation due to the API strong encapsulation.
  2. Native PHP session handling: by selecting this session management mode, you explicitely remove any core session management, and let PHP manage it. This can be useful if you intend to use low-level PHP extensions, such as Memcache or PhpRedis to handle session in PHP low-level layer instead of core. This allow to use any PHP native session storage to work gracefully: some of them are high performance.
  3. Cache based storage engine: Using the same session handling than core, but deporting raw session storage into a cache backend instance. You can use any already-functionning cache backend to store sessions. Sessions will use their own bin, and won't be cleared at cache clear all time.

Again from the linked issue after installing session proxy you likely need to configure your php.ini to something like:

session.save_handler = redis
session.save_path = "tcp://localhost:6379"
  • Sorry about that, I already googled that phrase and apparently in the mist of looking through all the links I somehow skipped the 2nd one. Thanks for pointing that back out to me, it is greatly appreciated. – FatGuyLaughing Aug 7 '14 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.