Make Your Web Server Snappy With php-apc

By | 2011/08/03



In Debian / Ubuntu, simply installing one package will instantly make your web server faster. (That is, if you are serving up php!)


Here ya go:

sudo apt-get install php-apc

Next, edit the following file:

$ sudo nano /etc/php5/conf.d/apc.ini

Increase the apc.shm_size as high as is available:

extension=apc.so
apc.shm_size=128M

A more detailed configuration can be found here:

http://gregrickaby.com/the-perfect-apc-configuration


Note: php-apc is only valid for php up to versions 5.4.x. As of PHP 5.5, caching is built in via opcache.

Sweet!

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.