# How to integrate Redis into Craft 3

> Connect Redis to your Craft CMS 3 installation on Kualo Business Hosting using Composer and a Unix socket.

Source: https://www.kualo.com/knowledgebase/other-apps/how-to-integrate-redis-into-craft-3
Updated: 2026-06-04

---

Redis is available on all Kualo Business Hosting plans and can significantly speed up Craft CMS by handling application caching. This guide walks you through the integration.

:::info
You must have Redis enabled in cPanel before following these steps. See [How to set up Redis in cPanel](/knowledgebase/cpanel-how-tos/how-to-set-up-redis-in-cpanel) if you have not done this yet.
:::

## Requirements

- A Craft CMS 3 installation on your account
- A Kualo Business Hosting plan (Redis is not available on lower-tier plans)
- SSH access enabled on your account

If you need to upgrade your plan or have SSH access enabled, open a support ticket with our HelpDesk.

## Step 1 - Install the Redis package

1. SSH into your hosting account.
2. Navigate to your Craft installation folder.
3. Run the following command to install the Yii2 Redis package:

```bash
composer require --prefer-dist yiisoft/yii2-redis
```

## Step 2 - Configure Craft to use Redis

1. Open `config/app.php` in your Craft installation.
2. Add the following code below the opening `return [` line:

```php
'components' => [
    'cache' => [
        'class' => yii\redis\Cache::class,
        'defaultDuration' => 86400,
        'redis' => [
            'unixSocket' => '/home/USER/.kxcache/redis.sock',
            'database' => 0,
        ],
    ],
],
```

3. Replace `USER` with your cPanel username.
4. If you are running multiple Redis instances on the same account, assign each a unique database number (for example, `0`, `1`, `2`).

:::tip
You can find your cPanel username in the top-right corner of your cPanel dashboard.
:::

If you run into any problems, open a support ticket with our HelpDesk.

---

_Source: Kualo Knowledgebase — https://www.kualo.com/knowledgebase/other-apps/how-to-integrate-redis-into-craft-3 · © Kualo Ltd._
