Wordpress error after upgrading to PHP 8.0 on Debian
I upgraded to PHP 8.0 on my Debian 10 server and I receive this message when I try to load my Wordpress page.
Your PHP installation appears to be missing the MySQL extension which is required by WordPress
✓ Best Answer
You need to install the PHP 8.0 packages for this:
sudo apt install php8.0-mysql
P.S. You should also investigate why your PHP 7.x package didn't upgrade. WP is written in PHP and uses MySQL. It uses PHP's MySQL facilities to talk to the WP database.
You should also investigate why your PHP 7.x package didn't upgrade
The guy that publishes the Debian packages (which I use on Ubuntu) publishes several versioned packages - php7.4-mysql, php8.0-mysql, etc.
You can’t upgrade from PHP 7.4 to 8.0 - it’s a different set of packages. You can upgrade from 7.4.13 to 7.4.14, for example, but you have to “install” the 8.0 version of the same 7.4 packages.
The benefit of this is you can run multiple versions simultaneously. I’m running 7.4 and 8.0 side-by-side whilst I verify compatibility and switch each site/app over one-by-one.
I’m guessing when the OP installed the PHP 8.0 packages, they had just missed the MySQL one.