In this tutorial, we will install and activate "MemcacheD Is Your Friend" on Wordpress to reduce the server load and improve the site speed.
-
Enable Memcached server from cPanel, for more information, please refer to the following article
-
Login to your Wordpress as admin
-
Go to plugins -> Add New
-
Search for "Memcached Is Your Friend" and install it
- Open wp-config.php with cPanel File Manager and add the following line:
$memcached\_servers = array( 'default' => array('/home/YourUsername/memcached.sock:0'));
You can view the exact memcached.sock path from cPanel -> Mocha Memcached.
Port should be set to "0", when the socket is in use.
- Under WordPress Admin -> Tools -> Memcached you can see the unix socket is in use
memcached: /home/demo/memcached.sock:0 pid: 16005 uptime: 523 threads: 4 time: 1526849433