HomePHPHow to enable XCache in cPanel

How to enable XCache in cPanel

XCache is an open-source opcode cacher, which means that it accelerates the performance of PHP on servers. It optimizes performance by removing the compilation time of PHP scripts by caching the compiled state of PHP scripts into the shm (RAM) and uses the compiled version straight from the RAM. This will increase the rate of page generation time by up to 5 times as it also optimizes many other aspects of PHP scripts and reduces server load. Enabling XCache will cause the sites to load faster.

Enabling XCache in cPanel servers:

Use EasyApache to enable XCache in cPanel servers.

Installing from source:

1) Download the source file from http://xcache.lighttpd.net/pub/Releases/

# wget http://xcache.lighttpd.net/pub/Releases/2.0.1/xcache-2.0.1.tar.gz

2) Extracting file.

# tar -zxvf xcache-2.0.1.tar.gz

3) change the directory to cache-2.0.1

# cd xcache-2.0.1
# phpize
# ./configure –enable-xcache
# make
# make install

Now edit php.ini and add the following extension.

extension=xcache.so

Restart apache and you will see XCache enabled.

Scroll to Top