What is Redis?
Redis is an open-source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Since it is in-memory it can be used as a cache backend for web applications to speed up the web application. For example, the popular CMS WordPress can use https://wordpress.org/plugins/redis-cache/ to speed up page render.
What is the problem with a standard Redis instance setup in the cPanel server shared by all users?
Standard Redis setup uses a single server instance shared by all web applications without password authentication. This is insecure as all data in the Redis server gets shared between all users and is not recommended in shared hosting
Autom8Redis automates the start/stop of a private Redis instance for each user, which can be managed by the user from his cPanel UI. This private Redis instance is only available to the user using Unix Domain Socket under his home directory and is therefore secure This private Redis daemon will run under the user/group credentials and the max memory of this Redis instance can be set according to the cPanel hosting plan for the user
Please follow the steps listed below to install the plugin
yum -y install https://github.com/AnoopAlias/AUTOM8N/raw/ndeploy4/nDeploy-release-centos-1.0-8.noarch.rpm
yum -y --enablerepo=autom8redis install Autom8Redis
To set max memory for each user according to the cPanel hosting plan. Add PLAN_NAME: memory in the file/opt/Autom8Redis/plan_memory.yaml . For example, if you provide 2 plans - starter, pro, and each need a separate memory limit, it can be added as below. The default plan is used for all other users whose hosting plan is not mentioned specifically
Running separate Redis instance consume memory. Please take into consideration the memory requirement especially if there are a lot of users on the server. The Redis max memory for the default plan can be adjusted accordingly
Autom8n "enterprise" plan subscription entails unlimited licenses for Autom8Redis. Please contact [email protected], if you need additional servers licensed
How to use Redis Cache with Wordpress and Autom8Redis?
Install Redis Object Cache Plugin and enable
Upon enabling it will show status : Not connected
Turn ON Redis from Autom8Redis plugin
Copy the path to Redis socket
Add the following setting in wp-config.php file (Change the socket path to the one you copied)
define( 'WP_REDIS_SCHEME', 'unix' );
define( 'WP_REDIS_PATH', '/home/automa8n/tmp/redis.sock' );
define( 'WP_REDIS_DATABASE', '0');
Autom8nRedis provide six database by dafault numbered 0,1,2,3,4,5. You can use any of these in the parameter WP_REDIS_DATABASE
Enable Redis Object Cache