Disable some versions of PHP

Ubuntu
18.04

Hi,

I have 4 versions of PHP currently installed and I want to keep them all installed. 7.2, 7.3, 7.4, 8.0.
At the moment all my sites are only using 7.3 so I want to disable (not remove) the other versions so they are not consuming RAM. I have tried switching them off on the dashboard but that seems to be a temporary measure as I find them active again later on.

Cheers

Greg J

I don’t know about a PHP disable feature in Virtualmin but at the command line try something like…

systemctl stop php8.0-fpm.service
systemctl disable php8.0-fpm.service

Ubuntu isn’t my distro so I may have the service name wrong. The correct Ubuntu way should stop a service from starting on boot. Until the next reboot systemctl stop should be enough.

Thanks Ramin.

That has worked but making those changes doesnt seem to affect the Virtualmin Dashboard interface. I can live with that.

Cheers

I see what you mean and there shouldn’t be a green check for a stopped service. I’m not sure a PHP version will be listed at all when disabled.

It can take a while for the dashboard to refresh. You can help it along with the spinner icon in the upper right corner. If a stopped or disabled service still shows as running there could be a bug, or maybe restarting Webmin cleans it up. Browser cache too.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.