Memcached Install on cPanel/WHM Servers Print

  • 0

A complete guide on how to install Memcache on a cPanel/WHM server with root access. Follow step by step tutorial to learn fast.

Memcached is a free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. It is highly recommended for use on servers that utilise MySQL/MySQLi in high load environments using carts such as Magento.

After installing Memcached you would need to enable it within your CMS application. For Magento see:

For older cPanel installation there are further instructions can be found from a post by David Ado and has been tested and works perfectly. Please visit: for full instructions on the installation of Memcached on older cPanel installations.

For Memcached installation on up to date cPanel please see below:

SSH into your server

# yum install memcached

Then, start memcached service

# service memcached start


root@server [~]# service memcached start
Starting memcached: [ OK ]

Then, install PHP memcache

# pecl install memcache


We can install memcache from the source by following the steps below:

# wget
# cd memcache (hit tab to fill out the version number)
# phpize

Then, you can see something like this:

# phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
# ./configure
# make
#make install

Make sure memcache module is present in php.ini file. If not, add the memcache extension in php.ini file.

# echo "" >> /usr/local/lib/php.ini

Finally, restart Apache

# service httpd restart

Make sure memcached will be up even after a server reboot:

# chkconfig --levels 235 memcached on

How to check if memcache is installed or not?

root@server [~]# php -m | grep memcache

That’s it!!!

Was this answer helpful?

« Back