Question

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

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: https://www.digitalocean.com/community/tutorials/how-to-install-alternative-php-cache-apc-on-a-cloud-server-running-ubuntu-12-04

But it talks about APC on ubuntu 12, does the same steps apply for Ubuntu 14?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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 <code>/etc/php5/apache2/php.ini</code> and change: <pre> ;opcache.enable=0 </pre> to <pre> opcache.enable=1 </pre> Next, make sure the php mod is enabled: <pre> php5enmod opcache </pre> Finally restart Apache: <pre> service apache2 restart </pre>

Check out this previous question for some more configuration options:

https://www.digitalocean.com/community/questions/enable-php-5-5-opcache-on-ubuntu-14-04-with-nginx-and-php-fpm

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

“”"

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.