How to add APC cache to Magento


Posted by Andrew McCombe on Thu May 10, 2012

Here’s how to add APC cache to Magento:

The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. It can help speed up your Magento installations.

First, install the PHP APC package (Assuming you are using Ubuntu as your web server):

Now configure APC for use with Magento. Edit /etc/php5/conf.d/apc.ini:

Once you have changed the apc.ini file you will need to restart the Apache Web Server:

Finally, configure Magento to use APC: Edit app/etc/local.xml and add the following:

That’s all there is to it. To check that APC is being used you can use the APC.php file as discussed in my post.