


If there is more than one directory that we need to add to the blacklist, simply add the second line(for example, if we’d want to disable opcache for /var/Now we need to inform php.ini about the blacklist file. The default value in php.ini are good enough except that we’d want to disable the opcache from caching the /var/www/html/admin directory where we keep our administration utilities, to do so we need to create a blacklist file first: cd /etc/php/7.0/fpmĪdd the directory /var/www/html/admin/* to the file Create OPcache-blacklist file configuration file OPcache is a core component built into php-fpm, so it does not require separate installation. The OPcache stores the compiled PHP codes and serves it from memory, which vastly improves performance. As of PHP 5.5, there’s now a built-in opcode cache called OPcache. This is quite inefficient as imaging that the WordPress web pages served rarely changes between page requests, therefore it’s unnecessary to re-compile it. PHP is an interpreted language that the code written in PHP is parsed compiled into Opcode on every page request. This article has been further updated on based on Raspbian Buster and PHP7.3 This article has been updated on based on Raspbian Stretch There are many cache plugins available, but we'd want to implement as much the cache at the system level as possible without depending on plugins. In the previous parts of the articles, we've covered how to setup the server and get the WordPress up and running with no considerations were made on how well the server would handle traffic. We had WordPress installed on the Raspberry Pi, we are going to look into how to implement various cache solutions to optimise WordPress without depending on plugins.
