Disabling Unused PHP Versions on GridPane

Content Error or Suggest an Edit

Notice a grammatical error or technical inaccuracy? Let us know; we will give you credit!

Draft Warning

You’ve reached a draft 🤷‍♂️ and unfortunately, it’s a work in progress.

Pretty much, you could disable them via systemctl. But you would need to disable the monitoring in monit as it will simply restart the service.

So here are the systemctl commands

❯ systemctl status | grep php | grep ".service"
             ├─php8.0-fpm.service
             ├─php7.3-fpm.service
             ├─php7.1-fpm.service
             ├─php7.4-fpm.service
             ├─php7.2-fpm.service
❯ systemctl disable php7.2-fpm.service
Synchronizing state of php7.2-fpm.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable php7.2-fpm
❯ systemctl stop php7.2-fpm.service
❯ systemctl mask php7.2-fpm.service
Created symlink /etc/systemd/system/php7.2-fpm.service → /dev/null.

With systemctl mask the service can’t be started.

Monit will complain about php-7.2-fpm not running, so you’ll have to add the following to the end of /etc/monit/conf.d/php72

if does not exist then unmonitor

Then no more monit alerts about it being down and it won’t show red in monit.

Enjoyed the content? Support My Work!

I love sharing WordPress tips, tricks, and research to help the community. If you found this article helpful and want to show your appreciation, consider buying me a coffee! Your support helps keep this site running and motivates me to create more quality content. 

0 Shares:

You May Also Like