Ubuntu 20.04: Webmin version 1.960
Virtualmin version 6.13
WordPress 5.5.3
WordPress and PHP-FPM 7.4 is all ok.
When I change to PHP-FPM 7.2 or PHP-FPM 5.6 there is an error in Wordpress.
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.
_
Username and password in Wordpress are the same as with PHP 7.4
Database is ok with other sites running Wordpress on the same server.
The site with error shows phpinfo.php just normal.
When I switch back to PHP 7.4 all is ok.
I’m on AWS and my PHP Versions are:
PHP Version 7.4.12
PHP Version 7.2.34-8+ubuntu20.04.1+deb.sury.org+1
PHP Version 5.6.40-38+ubuntu20.04.1+deb.sury.org+1
Wordpress is 5.5.3
I’ve already applied that fix last week and it did remove the error in virtualmin when making the switch. But I’m sorry to say it didn’t change anything regarding the error in Wordpress about connection to database.
php5.6-mysql is already the newest version (5.6.40-38+ubuntu20.04.1+deb.sury.org+1).
php7.2-mysql is already the newest version (7.2.34-8+ubuntu20.04.1+deb.sury.org+1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
The Apache Error log shows nothing.
The Access log shows: “GET /wp-admin/ HTTP/1.1” 500 3563 “http://www.xx.com/wp-admin/” "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) etc…
The Error I see on the website is like the headline says.
That’s because some sites does not run well with php 7.4 or won’t run at all.
You could say it’s their problem, but we try to help till they get it fixed.