How To Install And Enable redis For WHM/cPanel AlmaLinux 8

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:

  1. Connect to your server via SSH.
  2. Install the Redis software by running the following command:
yum install redis
  1. Start the Redis service by running the following command:
systemctl start redis
  1. Enable Redis to start automatically at boot time by running the following command:
systemctl enable redis
  1. 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.

  1. 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.

  1. Restart the cPanel service by running the following command:
systemctl restart cpanel.service
  1. 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

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.

Picture of admin

admin

Leave a Reply

Sign up for our Newsletter

Get the latest information on what is going on in the I.T. World.