How To Install Alternative PHP Cache (APC) on Ubuntu 14.04

Posted June 14, 2014 126.3k views
Can some one help me out with installing Alternative PHP Cache (APC) on Ubuntu 14.04 and configure with wordpress. I did find a tutorial here: But it talks about APC on ubuntu 12, does the same steps apply for Ubuntu 14?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers
APC is no longer needed in Ubuntu 14.04. It doesn't support PHP 5.5 which comes with its own built-in Opcache cache instead. To ensure that it is enabled, edit /etc/php5/apache2/php.ini and change:
Next, make sure the php mod is enabled:
php5enmod opcache
Finally restart Apache:
service apache2 restart
Check out this previous question for some more configuration options:

Just in Reply to ASB, W3 Total cache doesn’t support Zend’s Opcache - and isn’t planning on doing so according to the author of the plugin (for some strange reason?)… So, even though APC isn’t going to be supported by PHP-5 into the future (it works fine now), it is currently the only working option other than installing memcache.

  • Hello,
    so is that means i wont be able to chose cache method to Opcode: Alternative php cache (APC) in w3tc for minify, database, object etc???
    i just installed apc on my server but in w3tc still all option for APC is grayed out :(

    in compatibility check “Opcode cache: Not installed”

    and by the way, mistakenly i was applied as per ubuntu 12.04. do i have to remove all the editing i have done on that tutorial?

    for example:
    extension =
    apc.shm_size = 64

When i enter this command it gives this in reply ; SO IF THEIR IS SOLUTION THEN TELL ME


root@rebuildweb-gui:~# sudo apt-get install php-apc
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package php-apc is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘php-apc’ has no installation candidate