On this page
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 in your HumHub installation.
Before making any changes to HumHub, you will need to enable your Redis instance in cPanel. Follow the instructions in Enable Redis Unix Socket to do that first.
Edit common.php
Open protected/config/common.php and update the cache component to use the Redis Unix socket:
return [
'components' => [
'cache' => [
'class' => yii\redis\Cache::class,
'defaultDuration' => 86400,
'redis' => [
'unixSocket' => '/home/USERNAME/.kxcache/redis.sock',
'database' => 0,
],
],
],
];
Replace USERNAME with your cPanel username.
Check dynamic.php
Open protected/config/dynamic.php and confirm that:
- There is no
useApcukey defined for caching. - The
cacheentry undercomponentsuses the Redis Yii caching class, like this:
'cache' => [
'class' => 'yii\\caching\\Redis',
'keyPrefix' => 'humhub'
],
If useApcu is present, remove it or set it to false so that HumHub uses Redis rather than APCu for caching.
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 3
Connect Redis to your Craft CMS 3 installation on Kualo Business Hosting using Composer an...
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...
Still need a hand?
Real people, around the clock - start a chat or open a ticket and we'll help you put it right.