My .php files on Wordpress not update, I need to "service php-fpm81 restart" then updated.

carriechan

Verified User
Joined
Oct 17, 2019
Messages
18
Hello All,

I modified my .php files on WordPress, but not update, I need to "service php-fpm81 restart" then the .php updated.

I googled a lots of methods, but not working... like...
[global]
emergency_restart_threshold = 10
emergency_restart_interval = 1m
process_control_timeout = 10s

and

 
Normally you don't have to restart your php after making changes on your php files
Is there some kind of cache plugin/addon active ?
 
Yes, I have wp rocket cache plugin, but I already cache all cache, the following is my situation.

P. S. I tried to change php-fpm to fastcgi, then everything are working.
Screenshot 2022-06-10 at 2.28.15 PM.png
 
why do you think it not update ?

try put simple code like "echo 1; " to index.php
 
this will help you to custom Opcache option.
 
That is why I asked:
When talking about Wordpress there is a difference between Wordpress plugins and PHP addons like Opcache. ;-)

Opcache itself causes the PHP file to be cached, which expires after a minute so that it can be re-cached.
That's why it always takes a minute with Opcache before you see the changes.
 
this will help you to custom Opcache option.
Thanks for your guideline
 
Last edited:
When talking about Wordpress there is a difference between Wordpress plugins and PHP addons like Opcache. ;-)

Opcache itself causes the PHP file to be cached, which expires after a minute so that it can be re-cached.
That's why it always takes a minute with Opcache before you see the changes.
Hello

I have this custom setting


But no any update if I have not clear Opcache cache.

Are you talking opcache.revalidate_freq=0 value for "expires"?
 
I have the following custom
/usr/local/directadmin/custombuild/configure/opcache/opcache.ini
you custom on wrong path, you should place file in "/usr/local/directadmin/custombuild/custom/opcache/opcache.ini"

just create folder if not exists and besure you rebuild opcache "./build opcache"
 
you custom on wrong path, you should place file in "/usr/local/directadmin/custombuild/custom/opcache/opcache.ini"

just create folder if not exists and besure you rebuild opcache "./build opcache"
Sorry my mistake, I place on "/usr/local/directadmin/custombuild/custom/opcache/opcache.ini" too.
 
Not sure of the actual benefits of usage of opcache - I thought that when you modify PHP files, it looks at the timestamps/dates and then re-caches by default, but according to OP, this isn't the case.........

opcache.validate_timestamps=0 is the problem

NB. I do a lot of dev work, and caching is a nightmare, especially if you proxy via Cloudflare..
 
Not sure of the actual benefits of usage of opcache - I thought that when you modify PHP files, it looks at the timestamps/dates and then re-caches by default, but according to OP, this isn't the case.........

opcache.validate_timestamps=0 is the problem

NB. I do a lot of dev work, and caching is a nightmare, especially if you proxy via Cloudflare..
I tried it, and not set the "opcache.validate_timestamps=0", that's not working either.

May be the memory-based and file-based opcache issues.
 
If you want a per php version option for opcache, you can also do this.
Create a file called 99-custom.ini in:
/usr/local/php74/lib/php.conf.d
change php74 to the version you want to use it for.
You can put opcache settings you want in there. Don't forget to restart the php-fpm you changed this for.
 
Back
Top