Improve Php Performance in Centos By using Opcache

It known as Zend Optimizer+, Opcache, which can help to improve server and applications performance. It work by pre-compiling script byte-code in shared memory, so it help removing the need for php to load and parse scripts on each client request.

  1. yum install php-opcache
  2. run php -v to ensure php has this extension, will show:
  3. vi /etc/php.d/10-opcache.ini
  4. enable all of these by uncomment them:
opcache.enable_cli=1
opcache.memory_consumption=128…