How to configure Redis cache on HawkHost

Like Tweet Pin it Share Share Email

I have good news for you:

According to a notification on HawkHost’s blog, this hosting provider support Redis Cache all shared hosting plans.

Both Memcached and Redis are grouped in a new category named cPanel Application Manager.

In this post, I show you how to configure Redis Cache for WordPress blogs.

What is Redis Cache?

Redis Cache is a caching system which stores data on RAM. So that, Redis can boot website speed very much compared to access data from hard disk.

Redis and Memcached have many similar features. They belong to NoSQL family and store data on RAM. Memcached was born in 2003.

Redis was born later in 2009. Therefore, Redis is more powerful more than Memcached. In most cases, Redis beats Memcached.

You can learn more about the difference between Memcached and Redis Cache.

How to enable Redis on HawKhost

Step 1: Start Redis server

Open cPanel of HawkHost. Head over to HawkHost Links, click on Server Application Manager.

how to enable Redis Cache on HawkHost (3)

Next, you click on Enable link to start Redis.

how to enable Redis Cache on HawkHost (4)

It takes 5 minutes to start Redis

how to enable Redis Cache on HawkHost (5)

Once Redis is started successfully, you can see the message as below:

how to enable Redis Cache on HawkHost (6)

You will need to copy socket path to connect to Redis server as mentioned below. 

Step 2: Install PHP Redis module

You need to install PHP Redis module to connect your blog to Redis Server.

In the cPanel of HawkHost, go to Software. Click Select PHP Version.

how to enable Redis Cache on HawkHost (1)

Next, select Redis option. Click Save button to save your configuration.

how to enable Redis Cache on HawkHost (2)

Step 3: Install WordPress Plugin 

Case 1: 

If you use cache plugins which don't support Redis such as LiteSpeed Cache, WP Rocket: ​

You need to install and active plugin Redis Cache.

Once the plugin is activated, you open wp-config.php and add two 2 following lines to the file:

define(‘WP_REDIS_SCHEME’, ‘unix’);
define(‘WP_REDIS_PATH’, ‘/home/lookwpco/.applicationmanager/redis.sock’);

Replace my Redis Socket path with your value.

Now, go to Install -> Redis, click Enable Object Cache button.

how to enable Redis Cache on HawkHost (7)

If you see the status is connected, it means you install Redis Cache on your blog successfully.

how to enable Redis Cache on HawkHost (8)

Case 2: 

This case applies for W3 Total Cache plugin. If you are using this plugin, do the following steps: 

Go t​o General Settings, select Page Cache. At Page Cache Method, select Redis option. Click Save Settings & Purge Checks

how to enable Redis Cache on HawkHost 9

Do the same thing for Object Cache and Database Cache

HawkHost use Unix socket for Redis Server. So that, you need to adjust connection configuration.

Go to Page Cache. Scroll to Advanced part. At Redis hostname:port / IP:port,  enter your unix socket path. 

how to enable Redis Cache on HawkHost 10

Click Test button. If everything is OK, you'll see the message as "Test passed." Remember to click Save Settings & Purge Checks to save your setting. 

how to enable Redis Cache on HawkHost 11

Go to Object Cache and Database Cache, update connection information using the same path as the value in Page Cache

That’s all.

Now you know how to configure Redis Cache on HawkHost.

If you have any problems, please let me know in the comment box.  ​

Disclosure: Some of the links in this website are “affiliate links.” This means if you click on the link and purchase the item, we will receive an affiliate commission (at no additional cost to you). All opinions are our own and we do not accept payments for positive reviews.

Leave a Reply

Be the First to Comment!

Notify of
Scroll Up