Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Your PHP installation appears to be missing the MySQL extension which is required by WordPress

I recently changed configurations on my web server and moved my MySQL databases to a remote server. Upon making the changes, I removed MySQL from my web server just to make it as minimal as possible. My WordPress site was working perfect with the remote SQL until I removed it on the local server. Then I got the error:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress

I'm curious as to why WordPress forces you to have it installed even while using a remote connection? Is there a way to get around this?

Worst case scenario I guess I'll reinstall MySQL.

like image 954
garetmckinley Avatar asked Aug 09 '13 20:08

garetmckinley


People also ask

What MySQL extension is required by WordPress?

WordPress recommends using the latest stable version of PHP, which is currently PHP 7.4. If you're using a particularly outdated version of WordPress with a modern version of PHP, this error can also happen. PHP 7.0 deprecated the MySQL extension and WordPress now uses the newer PDO_MySQL or MySQLi extensions.

Which PHP extension is required for work with MySQL?

The extensions can either use the mysqlnd or libmysql library to connect from PHP to MySQL. Choosing one or the other library is a compile time decision. Both libraries are supported and constantly being improved. MySQL recommends using the MySQL native driver for PHP (mysqlnd) together with ext/mysqli or PDO_MySQL.


1 Answers

its not mySQL that is the issue you need to enable the mySQL extensions required by Wordpress in the php.ini file or install them if they don't exist.

When you removed MySQL it probably removed or diabled the extensions for it in PHP, atleast that is what it sounds like. You should be able to just install or enable the extensions back in without reinstalling all of mySQL

like image 181
wmfrancia Avatar answered Sep 21 '22 21:09

wmfrancia