I’m working on enabling PHP Opcache extension. To have this working correctly, PHP-FPM needs to be restarted after each deployment. My problem is that I cannot create a working webhook to do this. All problems seem to relate to the deployment user having insufficient privileges.
I have tried stuff like “service php-fpm restart” and “systemctl restart php8.2-fpm.service”. These fail because interactive authentication is needed. Switching to “sudo …” does not really help.
Do you have a solution to do this properly?
php-fpm reload should automatically happen at “Active” step for both php or Laravel site types as long as
Restart Service After Deployment option is on (see screenshot below; should be on by default). Can you provide us few more details to help you better?
- What kind of site is this?
- What version of php?
- Did you install php yourself manually or through Cleavr UI?
That is exactly what I was looking for! Didn’t know this feature existed. (I have a Laravel site with PHP 8.2 installed through Cleavr, so this should work already).
Thanks a lot!