Home » Cpanel/WHM » Install eAccelerator on cPanel Server – Command line

Install eAccelerator on cPanel Server – Command line

What is eAccelerator ?

Yes, before going directly to the installation steps, you must have an idea about eAccelerator. As the name indicates, it’s an accelerator for PHP scripts/files on your website. It’s an open source software which is used to increase the loading speed of PHP pages.

eAccelerator is a PHP accelerator derived from the MMCache extension for the PHP programming language. eAccelerator provides a bytecode cache. eAccelerator is open source and thereby free to use and distribute. Old and unmaintained versions also provided an encoder.

Every time a PHP script is accessed, PHP usually parses and compiles scripts to bytecode. Once installed, eAccelerator optimizes the compiled bytecode and caches this to shared memory or disk or both. Upon subsequent accesses to a script, eAccelerator will access cached bytecode if it is available instead of the script being compiled. This avoids the performance overhead of repeated parsing and compilation.

So we can conclude, the eAccelerator helps to improve performance by re-using compiled PHP scripts and optimizing them to speed up their execution.

Installation of eAccelerator on a cPanel server using phpextensionmgr script

Step I : Login to server as root.

Step II : Run the below pasted script:

/scripts/phpextensionmgr install EAccelerator

Un-installation of eAccelerator

/scripts/phpextensionmgr uninstall EAccelerator

How/Command to check whether eAccelerator is installed or not on a cPanel server ?

It’s very simple to check if eAccelerator is installed or not on the server. You can use the command “php -v” to check it from your server commandline. :-)
See the example below:

[email protected] [~]# php -v
PHP 5.4.26 (cli) (built: Mar 14 2014 02:39:49)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with eAccelerator v0.9.6.1-ea, Copyright (c) 2004-2012 eAccelerator, by eAccelerator

Alternate method

Installing eAccelerator from its source code.

This method is very helpful to install eAccelerator in a server which hasn’t cPanel. You can download latest version from HERE.

Please do follow the below pasted steps to install eAccelerator from its source file.

wget http://downloads.sourceforge.net/project/eaccelerator/eaccelerator/eAccelerator%
unzip eaccelerator-
cd eaccelerator-
./configure  --enable-eaccelerator=shared  --with-php-config=/usr/local/bin/php-config
make install

Make sure that the eaccelerator.so file available on extensions directory after the eAccelerator installation.


Add the following lines at the end of php.ini


Restart Apache web-server.

service httpd restart

Originally posted 2016-02-12 21:30:14.

About admin

I have been working with Linux based systems since 2002. I hope the article published on this site will be useful to those new to server administration.