There was a problem loading the comments.

How do I use Redis / Valkey?

Support Portal  »  Grid Hosting / hosting-panel.net  »  Viewing Article

  Print

First, you have to go to hosting-panel.net -> Tools -> Valkey Manager and activate it.

When you've activated it, you can use the configuration details listed to configure your given Redis/Valkey compatible system.

Note: If you're not defining a TTL on your Redis keys, we suggest using allkeys-lru as the eviction policy.

Redis Object Cache for WordPress

You need to use the Unix Socket option documented here: https://github.com/rhubarbgroup/redis-cache/?tab=readme-ov-file#connections 

define( 'WP_REDIS_SCHEME', 'unix' );
define( 'WP_REDIS_PATH', '/tmp/redis.sock' );
define( 'WP_REDIS_MAXTTL', 604800 );

LiteSpeed Cache

Go to Object Cache Settings

Ensure Object Cache is set to "ON"

Configure /tmp/redis.sock in "Host" and 0 in "Port".

Click Save Changes.

Laravel

Install predis:

composer require predis/predis:^2.0

Change your .env file settings as following:

CACHE_DRIVER=redis
REDIS_SCHEME=unix
REDIS_HOST=///tmp/redis.sock
REDIS_PASSWORD=null
REDIS_PORT=0
REDIS_CLIENT=predis

Magento 2:

bin/magento setup:config:set --cache-backend=redis --cache-backend-redis-server=/tmp/redis.sock --cache-backend-redis-port=0 --cache-backend-redis-db=0

Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

CAPTCHA
© PerfGrid