# How to set up Redis in cPanel

> Enable and configure Redis on your Kualo hosting account using the cPanel plugin, connect your application via a UNIX socket, and monitor performance from the built-in dashboard.

Source: https://www.kualo.com/knowledgebase/perf-caching/how-to-set-up-redis-in-cpanel
Updated: 2026-06-10

---

Redis is a high-performance, in-memory data store that can dramatically speed up your website by caching frequently accessed data. Instead of querying your database on every request, your application serves data straight from RAM, making responses far faster.

:::info
On Kualo we provide [Valkey](https://valkey.io/) under the Redis name - a high-performance, fully compatible open-source fork of Redis. It behaves exactly like Redis and works with all standard Redis clients, so your application needs no changes.
:::

Redis is available on our [Performance](https://www.kualo.com/webhosting/business-web-hosting) and [Magento](https://www.kualo.com/webhosting/magento-hosting) hosting plans, and on our [Agency reseller plan](https://www.kualo.com/resellers).

## Enabling Redis

1. [Log in to cPanel](/knowledgebase/cpanel-getting-started/how-to-login-to-cpanel) and, in the **Software** section, click **Redis**.
2. Redis starts out inactive. Under **Get Started** you will see the dedicated cache memory included with your plan. Click **Enable Redis**.

   ![The Redis plugin showing the Enable Redis button](https://kb-cdn.kualo.com/5a/49/5a49d88ff7a6434dfd8ad42985a6ef0a3bdecda5.png)

Redis activates straight away and the page switches to a live dashboard.

## Your Redis dashboard

Once Redis is active, everything you need sits on a single dashboard - the current status, live performance metrics, your connection details, password and cache controls, and detailed statistics.

![The full Redis dashboard once active](https://kb-cdn.kualo.com/6a/ca/6aca2b0240f904b0ea895c1790884c4ef7ad685d.png)

The sections below walk through the parts you will use most.

## Connecting your application

Redis on our platform runs over a **UNIX socket** rather than a TCP port. This avoids network overhead and is faster than a standard `127.0.0.1:6379` connection.

Your unique socket path is shown in the **Connection Details** card. It includes your account username, so yours will differ from the example below.

![The Connection Details card with the Redis socket path highlighted](https://kb-cdn.kualo.com/f0/8b/f08bd04e802a9f3a374648e2b8f90f3b8e67a64d.png)

The socket path follows this format:

```
/home/your-username/.kgix/redis/redis.sock
```

How you enter it depends on your application or Redis client library.

### Method 1 - a dedicated socket setting

Many applications and libraries let you specify a UNIX socket path directly, using a setting such as `unix_socket_path`, `socket`, or `path`. If yours does, enter the full socket path - you usually will not need to set a port.

```php
'unix_socket_path' => '/home/your-username/.kgix/redis/redis.sock'
```

### Method 2 - using the host and port fields

If your application only offers host and port fields (expecting something like `127.0.0.1:6379`), you can still connect using one of these formats.

**Option A (preferred for most PHP apps)** - pass the socket path as the host and `0` as the port. Libraries such as phpredis recognise this and use the socket:

```php
'host' => '/home/your-username/.kgix/redis/redis.sock',
'port' => 0
```

**Option B** - pass the socket and port together as a single string, for tools that do not accept them separately:

```
/home/your-username/.kgix/redis/redis.sock:0
```

:::tip
If one format does not connect, try the other - the right choice depends on how your application parses Redis connection settings.
:::

### Using separate database IDs

Redis provides 16 databases per account, numbered 0 to 15. Give each use case its own ID so different applications or components do not overwrite each other's data.

| Use case | Database ID |
|---|---|
| Magento cache | 0 |
| Magento sessions | 1 |
| Magento backend cache | 2 |
| WordPress object cache | 6 |

:::warning
Never reuse the same database ID for two different sites or purposes - it can cause data conflicts or loss. Keep a note of what each ID is used for.
:::

## Enabling the redis PHP extension

If you are connecting from a PHP application, you also need the **redis** PHP extension enabled.

1. In cPanel, open [Select PHP Version](/knowledgebase/cpanel-php/how-to-manage-the-php-version-in-cpanel-using-the-select-php-version-tool) and go to the **Extensions** tab.
2. Tick **redis**. Its dependencies (`igbinary` and `msgpack`) are enabled automatically.

   ![The redis extension ticked in the PHP Selector](https://kb-cdn.kualo.com/66/10/661019f22859a4ddb961b3d717fbf23a2286493f.png)

## Monitoring performance

The dashboard's **Detailed Statistics** panel breaks down memory, connections, activity and keys in real time.

![The Detailed Statistics panel on the Redis dashboard](https://kb-cdn.kualo.com/6d/20/6d20382b810556d35a8d21fec8113afe2b1ae870.png)

The headline figures to watch:

| Metric | What it tells you |
|---|---|
| `used_memory` / `maxmemory` | How much of your cache allowance is in use |
| `connected_clients` | How many processes are connected to Redis |
| `keyspace_hits` / `keyspace_misses` | How often requests are served from the cache; lots of misses can mean your app is not caching effectively |
| `evicted_keys` | Keys removed to free space - if this keeps climbing, your cache may be too small for your workload |

For a deeper look from the command line, see [monitoring Redis with redis-cli](/knowledgebase/perf-caching/monitoring-redis-with-redis-cli).

## Setting a password (optional)

By default your Redis instance is reachable only by your own account over the local socket, so a password is not required. If you would like to add one, use the **Authentication** card on the dashboard.

:::info
Setting or changing the password restarts your Redis instance briefly, which clears anything currently cached.
:::

## How Redis manages memory

When Redis nears its memory limit it automatically evicts the least recently used data to make room for new entries, so frequently used data stays cached while stale data is cleared first. On shared hosting your limit is set to a sensible value for your plan; on VPS and dedicated servers we can raise it - [contact our support team](https://www.kualo.com/company/contact) if you need more.

:::warning
Stopping, restarting or disabling Redis clears everything currently in memory - cached pages, sessions and object caches all have to be rebuilt by your application. Plan restarts for a quiet period, especially if Redis holds user sessions.
:::

## Clearing the cache and disabling Redis

- **Purge All Keys**, at the top of the dashboard, immediately clears all cached data without disabling the service - handy for a clean slate after a deployment.
- **Disable Redis**, in the Danger Zone at the bottom of the dashboard, stops the service entirely and removes all cached data. You can re-enable it again at any time.

![The Disable Redis control in the Danger Zone](https://kb-cdn.kualo.com/a2/33/a233f1328d647cb669b5b5448a1f0de25ad0591f.png)

## Accessing Redis from the command line

If you have SSH access, you can connect to your instance directly:

```bash
redis-cli -S /home/your-username/.kgix/redis/redis.sock
```

Most standard Redis commands work; configuration changes are disabled for security.

## Next steps

- [Integrate Redis with Magento 2](/knowledgebase/magento-performance/how-to-integrate-redis-into-magento-v2)
- [Integrate Redis with WordPress](/knowledgebase/wp-security/how-to-integrate-redis-into-wordpress)
- [Redis vs Memcached on Kualo](/knowledgebase/perf-caching/understanding-the-difference-between-redis-and-memcached-on-kualo)

If you need a hand setting Redis up or interpreting your stats, [open a support ticket](/knowledgebase/getting-started/how-to-create-a-support-ticket-in-mykualo) and our team will be glad to help.


---

_Source: Kualo Knowledgebase — https://www.kualo.com/knowledgebase/perf-caching/how-to-set-up-redis-in-cpanel · © Kualo Ltd._
