GreenGeeks offers the Redis application to our EcoSite Premium customers. Each customer gets their own Redis instance that is not shared with another user.
Redis is currently only available for customers on the EcoSite Premium network segment.
Enable Redis in cPanel
Login to cPanel
Go to the Software section and click the Redis icon.
Click the “On” radio icon and then the Submit button to save changes and enable Redis.
Once Redis is enabled, you will be provided with the Linux file system path to your Redis socket.
Redis PHP Extension
The “native” PHP version does not include the Redis extension.
To connect Redis to your PHP Website, you will need to enable the Redis extension for your PHP version using the Select PHP Version tool.
For instructions on using the Select PHP Version tool, refer to the https://www.greengeeks.com/support/article/how-to-choose-your-php-version/ support article.
Enable Object Caching in WordPress
GreenGeeks recommends using the Litespeed Cache plugin as it offers native support for Redis.
Login to WordPress admin, and access your Litespeed Cache plugin, under the Cache link.
Within the Cache settings, access the Object tab.
Within the Object Cache settings we need to enable set the following settings:
- Object Cache = On
- Method = Redis
- Host = [path to your socket]
- Copied from the cPanel Redis page, example value /home/username/tmp/redis.sock
- Port = 0
Click Save Changes at the top-right to save these new variables.
Once you have saved changes, refresh the page and you should see Connection Test: Passed indicating a successful Redis connection.
Object Cache Testing
To test the output, enable full debug logging in the Litespeed Cache toolbox using the following steps:
Select the Litespeed Cache Toolbox option
Select  Debug Settings tab on the Toolbox page
Disable All Features = Off
Debug Log = Admin IP Only
Admin IPs = Add your own IP to the list, it will be shown below.
Debug Level = Advanced
Click Save Changes at the top-right.
Once saved, this will allow Debug level logging for IPs listed in the Admin IPs field. Other IP addresses will not see these logs.
To see the debug info, view the source of a page from the front-end of the website.
At the bottom of the source will be the cache information, including Object Cache.
<!– Page generated by LiteSpeed Cache 5.4 on 2023-05-04 17:14:10 –>
<!– X-LiteSpeed-Cache-Control: private,max-age=1800 –>
<!– X-LiteSpeed-Tag: 9a2_tag_priv,public:9a2_HTTP.200,public:9a2_PGSRP,public:9a2_post,public:9a2_URL./2020/07/11/hello-world/,public:9a2_Po.1,public:9a2_ –>
<!– Object Cache [total] 1806 [hit_incall] 1756 [hit] 23 [miss_incall] 21 [miss] 6 [set] 4 –>
After testing, ensure that Debug Log is set to Off to avoid unnecessary overhead going forward.
For extended information about what is going on with the client’s Redis instance, there are alternative applications like RedisPHPAdmin, but these are not officially supported or provided by GreenGeeks.
For assistance with Redis on EcoSite Premium, please contact a Support Lead.