How to Fix “Your PHP installation appears to be missing the MySQL extension” error Print

  • Updated on 07-May-2024
  • 22

“Your PHP installation appears to be missing the MySQL extension” error

   This error occurs when your server’s PHP can’t connect your WordPress site to the MySQL database.

outdated WordPress software, or an old PHP version.

 

To resolve this issue, you can follow these steps:

  1.  Check your PHP version

    If you're using a PHP version later than 7.0, the MySQLi extension might not be enabled by default. To enable it, you can locate your 
    PHP configuration file (php.ini) and uncomment or add the following line.

    Open your public_html >phpinfo.php file>edit

    • Add the following code snippet

           

Once loaded, the web page will list all PHP settings currently used on your website, including the version that’s running.

This version should be listed at the top.

As you can see in the screenshot above, our version for the sample site is PHP 7.3.0. This version is compatible with the latest WordPress version and supports MySQLi extensions. Therefore, the Missing MySQL extension issue is due to outdated WordPress software.

 

2. Switch to a modern version of PHP

The second possible cause for missing the MySQL extension is using PHP 5.6 or lower for your WordPress installation. PHP version 5.6 and older versions support the PHP MySQL extension.

Hence, if you are running the latest version of WordPress, but your web server is configured with an older PHP version, you may get the MySQL extension error.

3. Update your core WordPress version

Follow the steps below to update your WordPress Admin site from the WordPress Admin area.

  1. Log into your WordPress Dashboard.
  2. Navigate to the WordPress Updates section and check if there are available updates.

  1. Click the “Update to version

After updating your WordPress core version, update all outdated plugins and themes to prevent any incompatibilities.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution