"Your PHP installation appears to be missing the MySQL extension which is required by WordPress”Is an error encountered by many blog and website owners with WordPress.
This is not a cause for concern. Lack of MySQL extension from PHP is typical of operating systems installed from scratch, VPS or dedicated servers, where PHP extensions were not part of the installation package. This problem is present on both Ubuntu and the CentOS. In this scenario, the problem is solved very simply with a PHP update and the installation of the module "PHP MySql".
Update PHP and install MySQL extension on Ubuntu
apt-get update apt-get install php-mysql
Update PHP and install MySQL extension on CentOS
yum update yum install php70w-mysql
After this step, restart Apache service or Nginx.
I also encountered the scenario in which although the MySQL extension exists in PHP, a blog created on WordPress displayed the error "Your PHP installation appears to be missing the MySQL extension which is required by WordPress". Most of the time, the error occurs when installing WordPress. This time, however, he appeared on a blog that had been active for several years.
In this situation, I found that the problem is not with the PHP modules, but with the very old version of WordPress, which is no longer compatible on PHP 7.4.4RC1. A simple upgrade of WordPress to the latest version solved the error.