I will mostly explain what happens and after that, I have placed 2 suggestions on how it can be fixed.
1. I had 3 versions of php installed (7.2,7.3,7.4)
2. I have like 5-6 websites on that server on various versions of php
3. When I removed both 7.2 and 7.3 (Let's stay up to date as much as possible. I was thinking that I changed most of them on php 7.4 but I was wrong.)
4. No problems uninstalling but the problems started after that.
5. There were several websites that weren't on php 7.4 and they were broken.
6. Even tho I tried changing the php version on every website to 7.4 (per site basis) and restarted the php, nginx, the whole server to be sure, it didn't make a diffirence.
7. So I installed everything back again because of the hour-two of downtime :D
Suggestions: (One is good, both is great)
1. Tell the user that there are still websites using that php version and it will break stuff if you uninstall it
2. If a php version is uninstalled, change every website that uses it to a higher version so it dosn't completely kill the website.
Thank you for catching the bug! I've fixed this bug and it will be live in our next deployment!
The new procedure is that Ploi asks for a confirmation when a site is using the PHP version that you are trying to uninstall to set it to the default PHP version of the server.