One site didn’t like PHP 7.4 so I decided to also install 7.2
When I try to change PHP in Server Configuration / PHP Version I get:
Failed to save PHP versions : Apache virtual host was not found
Also the same error when I go back to 7.4.
When I check /home/domain/etc there is only folder php7.4 and a sym link php.ini -> php7.4/php.ini
But then I got another problem.
When I switch from PHP7.4 to PHP7.2 I can see the phpinfo.php is correct.
But now Wordpress can not run because it can not connect to MySql Database.
If I switch back to PHP7.4 it can. I tried to switch many times.
With PHP7.2 there is no connection to MySql.
I now did install cgi also but still no database.
Php7.4 is ok. I get this text when I change to php7.2 or 5.6.
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.
Are you sure you have the correct username and password?
Are you sure you have typed the correct hostname?
Are you sure the database server is running?
Nothing out of this is changed. phpinfo.php shows correkt information.
There is nothing about it in error log for that site.
Other WordPress sites on the same server are not affected and all use the same MySql database.
If I change one letter in DB_USER or DB_PASSWORD I get exactly the same error.