How to Install APC PHP Cache on Plesk / Centos server

Posted on December 14, 2012

What is PHP APC Cache?

If you’ve been around PHP for a while, you’ve probably heard about APC, the Alternative PHP Cache. APC is an opcode cache that can significantly speed up your PHP applications, by caching both PHP code and user variables. Adding APC to an application usually results in improved application response times, reduced server load and happier users. Thanks to 2bits blog for this guide.

APC is an opcode cache that can significantly speed up your PHP applications. When dealing with Plesk web servers with multiple users and websites, APC PHP cache might be required in order to achieve reliable server performance.

Step 1: Getting Started

The Alternative PHP Cache (APC) is a free, open, and robust framework for caching and optimizing PHP intermediate code. It's an PECL extension which shares the packaging and distribution system with its sister, PEAR. In case you don't have php-pear installed, run this command:

Step 2: APC PHP Dependencies

Next, let's install any remaining dependencies which are required by PHP APC

Step 3: Installing APC using the PECL command

Step 3: Enable Alternative PHP Cache

Enable APC PHP cache in Apache's configuration. By using command:

Step 4: Restart Apache

Lastly, restart Apache:

That's it. Enjoy!

Related Posts

  • Mais Zurborg

    Plesk uses a modified fcgid (which is wrongly names fastcgi in the plesk backend) as the default php module which prevents several process instances and thusly kills apc every seconds (apc log reports uptime 0). Real fastcgi cannot be enabled on a plesk installation.
    Currently, it is not possible to use a stable APC installation on a Plesk server.

  • Dolomats

    Hello i followed your instructions and the instalation was fine no errors
    but the APC is not Enable i have this message :
    No cache info available. APC does not appear to be running.
    and in the phpinfo cant find it
    HElp pls

Contact Us

Have a question? Send us a message. We'll get back to you soon.