An Operational Code Cache can speed up page compilation signifactly. If not yet done so activate it. You can verify this with
php -i | grep opcache on the command line.
If missing, install it with
sudo apt install php-opcache.
The settings that have worked smoothly for me with WordPress are:
As you can see, I don’t revalidate a files’ timestamp. This is done on purpose, because in Part 4 (Setting up Continuous Integration with GitHub actions) of this article series we have ensured that every deploy ends up in a unique release folder. This results in a new physical path to the same file upon every commit – which eliminates the need to check the filestamps for a specific path.
I recommend using this excellent one-file OPCache status monitor to visualise the usage of you OPCache memory. You want little misses, and many hits. If your OPCache Memory consumption is very high, for example above 90%, then you should increase the opcache.memory_consumption value.