Redis is an open-source, in-memory data structure store that is often used as a cache or message broker. It’s a great way to speed up your website and improve its performance. If you’re using WHM/cPanel on an AlmaLinux 8 server, you can easily install and enable Redis by following these steps:
- Connect to your server via SSH.
- Install the Redis software by running the following command:
yum install redis
- Start the Redis service by running the following command:
systemctl start redis
- Enable Redis to start automatically at boot time by running the following command:
systemctl enable redis
- Check that Redis is running properly by running the following command:
redis-cli ping
You should see the response “PONG”, which indicates that Redis is up and running.
- Next, you’ll need to configure Redis to work with cPanel. To do this, you’ll need to edit the file /var/cpanel/cpanel.config. Add the following line to the end of the file:
varnish_enable=1
Save the file and exit the editor.
- Restart the cPanel service by running the following command:
systemctl restart cpanel.service
- Finally, you’ll need to enable Redis caching in your cPanel account. To do this, log in to cPanel and navigate to the “Redis” section. Click the “Enable” button to enable Redis caching.
That’s it! You’ve successfully installed and enabled Redis on your WHM/cPanel AlmaLinux 8 server. Redis can now be used as a cache for your website, which can greatly improve its performance.
Hosting maintenance note
Redis can help WordPress and PHP applications respond faster, but only when the service, PHP extension, and application cache layer all agree. Enable one object-cache path at a time, keep a rollback note, and verify the site with cache warm and cold before calling the change complete.
Before changing a live site or server, capture the current configuration, confirm recent backups, and decide how you will roll back if the change affects logins, checkout, forms, cron jobs, or customer traffic. For shared hosting, make changes during a window where you can watch logs and customer-facing pages.
Post-change verification
- Validate the server or application configuration before reloading services.
- Test the exact workflow the change was meant to improve.
- Clear only the cache layers needed for the test, then retest from the public edge.
- Review logs for warnings, permission errors, failed requests, or unexpected redirects.
Related hosting performance reading
- Current Redis WHM/cPanel install guide
- Current Memcached WHM/cPanel install guide
- Current Imagick WHM/cPanel guide
- Current Imagick Linux hosting guide
- WordPress performance optimization guide
- WordPress speed tips
- How To Install Imagick on WHM/cPanel (CentOS 7 or AlmaLinux 8)
- How To Enable gzip With NGINX and Ubuntu 22.04
When to use the newer Redis guide instead
This AlmaLinux 8 article is useful for understanding the original WHM/cPanel Redis workflow, but newer servers should also be compared against the current Redis WHM/cPanel guide. Package sources, PHP versions, and object-cache plugins can change over time. If the server is CloudLinux, AlmaLinux 9, or a current cPanel build, verify the modern package path and test with the active PHP handler before enabling Redis for customer sites.


