Instructions to enable Memcached on Hawk Host’s hosting

Tutorials 0 lượt xem
This entry is part 3 of 6 in the Using Hosting at Hawk Host series

Hawk Host is a shared host service that I always recommend.

Compared to many other hosting providers, Hawk Host equips its hosting service with many attractive features.

Examples of some salient features:

  • Use LiteSpeed ​​instead of Apache for optimal speed.
  • The ability to update to the latest PHP version is extremely fast.
  • Memcached and redis cache support reduces database query load.

Read more : Hawk Host review and hosting registration guide from A to Z

These features really help speed up your website a lot.

Such features are often hard to find in other hosting providers.

However:

The hosting price is quite cheap and affordable for the majority of users. Especially, Hawk Host always has a discount code of up to 40%. You can refer here .

Talking about the Memcached feature, HawkHost has integrated Memcached into cPanel.

Memcached is not enabled by default. So in today’s article, I will show you how to enable Memcached for your website.

First of all, let’s find out what Memcached is. If you don’t understand, skip it and start installing it as below. 

Experience the speed improvement, just use it. ​

What is Memcached?

Memcached is a distributed memory caching system. It speeds up the website by caching data and objects into RAM.

Instead of querying the database directly for each request, memcached will cache common database queries and serve them from memory. As a result, the number of database queries is reduced. 

memcached-architecture

PHP provides 2 extensions to connect to the memcached server. Those are memcache and memcached. PHP 7 has removed the memcache module.

Therefore, you cannot use the Memcached Object Cache plugin if your website is running on PHP 7.x.

In this article, I will share another solution to connect your website with Hawk Host’s Memcached system for PHP 7.x.

Instructions to enable Memcached feature on HawkHost

First, you access Hawk Host’s cPanel. Move to the Hawk Host Links section. Click on Server Application Manager

Enable Redis Cache HawkHost 3

Click on the Enable link of Memcached to start the Memcached server. 

enable memcached hawkhost 1

Memcached takes 5 minutes to start up. 

enable memcached hawkhost 2

As soon as Memcached starts up successfully, you will see the status is Online

enable memcached hawkhost 3

Currently, Hawk Host uses Unix socket instead of TCP socket to connect to the Memcached system.

Unix sockets will be 33% faster than TCP sockets . You will use the Unix socket address to connect to the memcached server. 

using Hawk Host 6's memcached feature

Go back to cPanel Dashboard, move to Software section, click Select PHP version

upgrade php 7.1 for wordpress 1

Find and click on the Memcached module to enable it

using Hawk Host 9's memcached feature

Go to WordPress Admin and install a plugin that supports Memcached

Install the MemcacheD is your friend plugin .

This plugin is located on GitHub. How to install the plugin on GitHub you refer here . 

After installing and activating the plugin, add the following code at the top of the wp-config.php . file

$memcached_servers = array( 'default' =&gt; array(<br> '/home/lookwpco/.applicationmanager/memcached.sock')<br>);

You replace ‘ /home/lookwpco/.applicationmanager/memcached.sock with your value. This is the connection information to the Memcached server.

Finally go to Tools->Memcached . If your website successfully connects to the Memcached server, you will see the information of the memcached server:

using Hawk Host 5's memcached feature

This case applies to the situation where you use the W3 Total Cache plugin.

That is all. So, you already know how to enable Hawk Host’s Memcached feature. Good luck.

If you have problems using Hawk Host’s Memcached, please leave a comment below.

If you found the article useful, don’t forget to share it with your friends. 

signature

View articles in the series

Previous Part: How to Speed ​​Up WordPress with LiteSpeed ​​Cache Next Part: How to Use JetBackup in Hawk Host’s cPanel

Bài viết liên quan