How to Install Memcached on cPanel Server

Install Memcache on CentOS (WHM/cPanel)
  1. Step 1: Login into your WHM panel and using easyapache2 to enable Memcache.
  2. Step 2: SSH into your server and fire this command yum install Memcached. ...
  3. Step 3: Go to Software -> Module Installers -> PHP Pecl, Search for Memcache, and then install both Memcache & Memcached.
  4. Step 4: Restart apache once, using the command: service httpd restart

If Memcached is not available in easyapache2 then follow the below step to install Memcache via command line.

For Memcached installation on cPanel please see below step:

SSH into your server

# yum install memcached

Then, start Memcached service

# service memcached start


[email protected] [~]# 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 the Memcache module is present in the php.ini file. If not, add the Memcache extension in the 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?

[email protected] [~]# php -m | grep memcache

All Done! If everything goes well, You should now be able to use Memcached within your application.

  • 4 Users Found This Useful
Was this answer helpful?

Related Articles

How to access phpMyAdmin directly without cPanel access?

In this tutorial, I’m going to share the steps in installing PhpMyAdmin on your web hosting...

How to increase MySQL Connections limit

If you need to increase MySQL Connections without MySQL restart do below step, also if you don't...

How to Install Imagick on cPanel Server

To install Imagick first install ImageMagick on the server. Learn how to install Imagick on...

PHP Max Execution Time Setting on cPanel Server

 How to set PHP max execution time on cPanel. A quick step by step guidelines for new learners....

How to Install NGINX on cPanel/WHM Server

Learn how to install NGINX on cPanel Server following tutorial. Installing NGINX is very easy...

Powered by WHMCompleteSolution