fbpx

PHP Installation Missing MySQL Extension Required By WordPress

php installation missing mysql extension

For hosting your website, WordPress is an immensely robust and trustworthy platform; however, it is not faultless. PHP installation missing MySQL extension required by WordPress is among a few of the usual error messages you might encounter. Usually, this WordPress error means that something has gone wrong with the programming on your website. The error also suggests that WordPress can’t get to the MySQL database because of something.

It could be unsettling and annoying to encounter this warning. But there are some easy things you can do to figure out what the problem is and how to fix it. This blog post will decipher the meaning of this error and some likely causes. The solutions you can utilize will then be explained to you in detail. Let’s get rolling!

Why does WP Missing MySQL Extension Error Occur?

The error “PHP Installation Missing MySQL Extension Required by WordPress” typically occurs when a fresh WordPress is installed. However, it can also happen if you just migrated to a different operating system, such as Linux, or if you modified your server’s configuration or website.

Ways to Fix the MySQL Extension Error  

1- Check the PHP version you are currently using

2- Update your WP

3- Update the related plugins

4- Verify you have installed the MySQL extension

5- Make sure the PHP extension is set up properly

Check the PHP version you are currently using

You must be aware of the PHP version used by your WordPress site to determine what is generating the PHP INSTALLATION MISSING MYSQL EXTENSION REQUIRED BY WORDPRESS problem. There are two ways to go about it. You may check your website’s PHP version directly from your WP dashboard.

Click Tools and then > Site Health.

Beneath the Site Health Status, your WordPress dashboard will show you the PHP version you are using. It will also tell you whether you should update it or not.

PHP installation missing MySQL extension

You’ll need to use an FTP client to access your website if you can’t connect to your WordPress dashboard. Although this technique is more complicated, it is still relatively quick and straightforward.  

  • Connect to your server via Filezilla or any FTP client.
  • Open the public_html folder. The folder is a root directory for your WP website.
  • Make a blank file and assign it the name ‘phpinfo.php.’
  • Edit the phpinfo.php file.

Insert the code snippet as follows:

                      <?php phpinfo(); ?>  

Open that file in a browser now. Simply modify the URL of your website by adding /phpinfo.php. It will therefore appear as: mywebsite.com/phpinfo.php

Once it has loaded, the webpage will display a list of every PHP setting currently in use on your website, along with the version. The top of the list needs to include this version.

PHP installation missing MySQL extension

If you have PHP version 7, you need to update the WordPress software. Follow step 2 for the same.

On the flip side, if you still have any version of PHP 5, you may be missing the MySQL extension. Follow step 4 for the same.

Remember, it is highly advised to use the most recent PHP version for your website (currently 8.0). It offers improved compatibility with the most recent themes and plugins, and is quicker and more secure.

Update your WP

If you have PHP 7 or above with an obsolete WordPress version, you may encounter the PHP installation missing MySQL extension required by WordPress error. The reason is that PHP 7 deprecated the MySQL extension, which the older WordPress version needs.

You won’t notice an error message in newer versions of WordPress because they use alternative extensions like PDO MySQL or MySQLi extensions. Thus, you should confirm whether a new WordPress version is available.

If your luck is still favouring you and you can access your WP dashboard, it’s possible to check whether you have an update on the dashboard.

  • Click Dashboard and then Updates.
  • If the message is “A new WordPress version is available,” press the “Update Now” button.
  • Click Dashboard and then Updates.
  • Select Update all if available.  
PHP installation missing MySQL extension
  • Update the Related Plugins

Similar to the obsolete core software, obsolete plugins can bring compatibility problems with PHP that ignite the PHP installation’s missing MySQL extension required by WordPress.

In the case of your ability to login to the WP dashboard, satisfy yourself that each of your plugins is functioning with its latest available versions. If you are unable to login into your dashboard, then you need to update all your outdated plugins through an FTP client.

  • Download plugin .zip.
  • Extract the above.
  • Using FTP, log in to the website’s server.
  • Go to the WordPress content folder.
  • Select the folder of plugins.
  • Delete the plugin folder you have to update.
  • Get the extracted plugin folder (downloaded earlier), right-click it, and click “Upload.”

Verify You Have Installed the MySQL Extension

The MySQL extension isn’t yet discontinued if you use an earlier PHP version (5.6 or lower). So, if you have trouble with a MySQL extension, it might be because the extension wasn’t installed.

Return to the phpinfo.php file loaded in your browser in step one to verify that. Look for the row with “Client API library version” in it. You ought to see a four-digit number with dots between the digits.

PHP installation missing MySQL extension

If the row is missing or you cannot see it, then the MySQL extension is not installed. You now need to reach out to your hosting provider and install it. Alternatively, have an updated PHP version on your WordPress site, and there will be no need for the extension. 

Make sure to remove the phpinfo.php file once you finish the installation. You don’t need anyone else to view it and use it to access your server because it contains information about your server.

Make Sure the PHP Extension is Set Up Properly 

If you have the current version of WordPress and PHP and are still getting the “PHP installation missing MySQL extension required by WordPress” error, then there is something wrong in your configuration for the PHP extension.

To confirm, go back to the phpinfo.php file that you loaded in the first step. Read the row named “Loaded Configuration File.”

PHP installation missing MySQL extension

In the row named “extension dir,” check its value with that row’s value. If they don’t line up, modify your php.ini file and substitute the file location indicated for the loaded configuration file.

Wrap Up

Like any other error in WordPress, the PHP installation’s missing MySQL extension required by WordPress can frustrate you. It can badly affect your site’s user experience. However, if you religiously follow the steps identified above, you can quickly get rid of it and start running your site ASAP with negligible damage to the UX.

Pin It on Pinterest

Share This
Scroll to Top