The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. It’s goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code.
Download latest APC from pecl.
# cd /usr/local/src/
# wget http://pecl.php.net/get/APC
Extract the downloaded APC and compile it.
# tar -xvf APC
# cd APC-*
# phpize
# ./configure
# make && make install
Now, you will have to enable the extension in php.ini on your server. Below command will give you the exact server’s php.ini
# php -i | grep php.ini
Add “extension=apc.so” & restart apache.
To check if it is compiled properly, use command below OR create a phpinfo & check the output.
# php -i | grep apc
You can install APC on our VPS Hosting & Dedicated Servers.