> ## Documentation Index
> Fetch the complete documentation index at: https://perfgrid.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How do I use Redis / Valkey?

Enable Valkey under **hosting-panel.net** → **Tools** → **Valkey Manager**, then use the **socket path and settings** shown there in your app. See [Valkey Manager](/docs/grid-hosting/tools/valkey-manager) for memory limits, eviction policies, and statistics.

<Warning>If you do **not** set a **TTL** on keys, consider the **`allkeys-lru`** eviction policy otherwise it will likely result in `Out of Memory` errors.</Warning>

## Redis Object Cache for WordPress

Follow the **Unix socket** connection notes in the [Redis Object Cache readme](https://github.com/rhubarbgroup/redis-cache/?tab=readme-ov-file#connections):

```php theme={null}
define( 'WP_REDIS_SCHEME', 'unix' );
define( 'WP_REDIS_PATH', '/tmp/redis.sock' );
define( 'WP_REDIS_MAXTTL', 604800 );
```

## LiteSpeed Cache

Under **Object Cache**, turn Object Cache **ON**. Set **Host** to `/tmp/redis.sock` and **Port** to `0`, then **Save Changes**.

## Laravel

```bash theme={null}
composer require predis/predis:^2.0
```

`.env` example:

```ini theme={null}
CACHE_DRIVER=redis
REDIS_SCHEME=unix
REDIS_HOST=///tmp/redis.sock
REDIS_PASSWORD=null
REDIS_PORT=0
REDIS_CLIENT=predis
```

## Magento 2

```bash theme={null}
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
```

## Related articles

* [Valkey Manager](/docs/grid-hosting/tools/valkey-manager)
* [What's hosting-panel.net](/docs/grid-hosting/general/what-s-hosting-panel-net)
