On this page
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.
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.
You must have Redis enabled in cPanel before following these steps. See 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
- SSH into your hosting account.
- Navigate to your Craft installation folder.
- Run the following command to install the Yii2 Redis package:
composer require --prefer-dist yiisoft/yii2-redis
Step 2 - Configure Craft to use Redis
- Open
config/app.phpin your Craft installation. - Add the following code below the opening
return [line:
'components' => [
'cache' => [
'class' => yii\redis\Cache::class,
'defaultDuration' => 86400,
'redis' => [
'unixSocket' => '/home/USER/.kxcache/redis.sock',
'database' => 0,
],
],
],
- Replace
USERwith your cPanel username. - If you are running multiple Redis instances on the same account, assign each a unique database number (for example,
0,1,2).
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.
Was this helpful?
Your feedback helps us find gaps in the docs.
Thanks for the feedback!
Related articles
Apps & frameworks
How to install Craft CMS in cPanel
A step-by-step guide to installing Craft CMS on your Kualo hosting account via cPanel.
Apps & frameworks
How to integrate Redis into Craft CMS version 2
Connect Craft CMS version 2 to Redis running on a UNIX socket with three targeted configur...
Apps & frameworks
How to install Odoo with WSGI
Learn how to install and configure Odoo on Kualo hosting using WSGI for optimal performanc...
Apps & frameworks
How to enable Redis cache via Unix socket on HumHub
Configure HumHub to use Redis cache via a Unix socket by editing two configuration files i...
Still need a hand?
Real people, around the clock - start a chat or open a ticket and we'll help you put it right.