Matomo Analytics

This is most likely due to the fact that you have OPCache enabled, which is actually no problem.

You will have to clean the OPCache's cache after new code has been submitted, this is because PHP code is cached in the FPM worker and will not refresh until you say it should.

In case of a deployment, you can either use these lines to refresh the FPM worker (to your deploy script):

echo "" | sudo -S service php7.4-fpm reload

In case of WordPress or any other PHP application you can reload through Ploi's UI inside the PHP tab, click "Reload PHP worker" then you're all set!

Automatically invalidating OPcache

It is also possible to automatically invalidate the OPcache based on the validate_timestamps & revalidate_freq setting.

To do this, edit your PHP FPM (which you can do in the panel under the PHP tab) and set the validate_timestamps to 1 (which is true).

Next set the revalidate_freq to any number you want it to check for updates, this number is in seconds. Setting this value to 0 will tell OPcache to check upon every request.

06 August 2018 (last updated 3 years ago)

5029 views

Written by Dennis

Dennis brings over 6 years of hands-on experience in server management, specializing in optimizing web services for scalability and security.

Back to PHP


Start free trial