How to use Memcached on web hosting of Hawk Host

Like Tweet Pin it Share Share Email

Hawk Host is a highly recommened shared host for WordPress. Compared to other hosting providers, Hawk Host equips its hosting plans with many attractive features. Some key features:

Read more: HawkHost review and how to register a hosting plan

These features above really boost your website performance. Best of all, web hosting of Hawk Host is pretty affordable. Refer to my Hawk Host promo codes to get 40% off coupon.

When it comes to Memcached, Hawk Host integrate Memcached into its cPanel. By default, Memcached isn’t enabled. You will learn how to enable Memcached in this article. Also, I show you how to use Memcached on PHP 7.x.

What is Memcached?

Memcached is a distributed memory object caching system. It speeds up your website by caching data and object in RAM. Instead of querying the database directly, Memcached will cache common database queries and serve them from the cache.

As a result, the number of database queries is reduced. In other words, Memcached alleviates database loads. You can view the following diagram to understand how Memcached works.


To connect to Memcached server, PHP gives you two modules: Memcache and Memcached. PHP 7 removed Memcache module. Therefore, you can’t use Memcached Object Cache plugin if your website is running on PHP 7.x. I reveal another plugin to connect your website to Memcached server of Hawk Host.

How to use Memcached for PHP 7.x

1. First, you log in to cPanel of Hawk Host. Navigate to Hawk Host Links section. And click on Memcached link.

How to use memcached on web hosting of Hawk Host (4)

2. Click on Start Memcached link

How to use memcached on web hosting of Hawk Host (5)

3. If you start Memcached successfully, you will view the notice like this:

How to use memcached on web hosting of Hawk Host (6)

At present, Hawk Host uses Unix socket instead of TCP socket to connect to Memcached server. It is due to that Unix socket is 33% faster than TCP socket.

You will use the address of Unix socket to connect to Memcached server as shown below.

4. Back to cPanel Dashboard, navigate to Software. Click on Select PHP version link.

how to upgrade to php 7.1 (1)

5. Find and select Memcached module

How to use memcached on web hosting of Hawk Host (12)

Go to WordPress admin. Install and activate MemcacheD is your friend plugin

As I mentioned above, PHP 7.x removed Memcache module. Thus, MecacheD is your friend is the most simple way to connect your website to the Memcached server.

After installing the plugin, you need to copy and paste the following code at the top of wp-config. Php

$memcached_servers = array( 'default' => array(

Remember to replace ‘/home/lookwpco/.hostdata/memcached.sock’ with your value.

Ultimately, go to Tools->Memcached. If everything is Ok, you will view statistics of Memcached.

How to use memcached on web hosting of Hawk Host (8)

That’s it. As such, you have already learned how to use the Memcached feature on the web hosting of Hawk Host. Now check the speed of your website again.

If you have trouble enabling Memcached, don’t hesitate to leave a comment below.

If you find my article helpful, don’t forget to share with your friends.

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

2 Comments on "How to use Memcached on web hosting of Hawk Host"

Notify of
Sort by:   newest | oldest | most voted

Thanks for writing these instructions. I followed them but the front-end of my website was messed up. Some images & content did not load. Have you ever encountered this issue?

Scroll Up