Let’s create your online succes together.
Unlocking the potential of your WordPress presence with tailored solutions that blend innovation, aesthetics, and functionality.
Let's Begin

How to Fix the MySQL Extension Missing Error

This error signifies a problem in your website's code that prevents WordPress from connecting to the MySQL database. Though it's not a critical error, it still requires attention.
WordPress Fixes
25.10.2023
Damla Dağ Developer

If you are a candidate or already a WordPress user, you should consider that you may face some WordPress errors during installation or as soon as you install a new plugin. Just as WordPress installation is not difficult, when you encounter any WordPress error, it won’t take you too long to solve that error. To achieve the desired result in a short time, just follow the appropriate steps given by a reliable source in the most correct way and you will see that your WordPress will be ready for use again as soon as possible. We will continue our article to give you the most reliable information about how to fix the MySQL extension missing error which is one of the most common problems faced by users.

Your PHP Installation Appears To Be Missing The MySQL Extension Which is Required by WordPress.

When you get this error, there is nothing to be afraid of. The MySQL extension missing error which is not included in the scope of WordPress critical error, is a herald that a problem has occurred in a code on your website and because of this code problem, a situation has occurred that will prevent your WordPress to connect with the MySQL database. In fact, database-related errors are included in the scope of critical errors, if you try to solve your problem by taking the steps correctly, you will easily reach a solution without facing any problem. So what can be the problem or problems and what are the solutions?

Why Does the MySQL Extension Required by WordPress Appear Missing When Installing PHP?

One of the tasks that the PHP has to do when installing your WordPress is to connect your WordPress site to the MySQL database, and there is an extension that PHP needs when providing this connection. MySQL extension missing error; When you encounter this WordPress error, you can understand that PHP does not have the extension needed to connect your WordPress site to the MySQL database. There are two main reasons why you do not have the required extension or PHP cannot reach this extension:

  1. You can be using an older version of WordPress with PHP 7+.
  2. You can be using an older version of WordPress with a modern PHP version. If PHP 7+ no longer contains the MySQL extension that your WordPress needs, you probably face the MySQL extension missing error.

WordPress Update

MySQL extension missing error; For those who get this error and are looking for the solution, our first suggestion will be to complete the WordPress update phase. If there is an incoming WordPress update that includes fixes, new features, improving safety, and more performance improvements, you will need to make this update.

If you want to manually update WordPress, after logging in to your panel, you will see a warning about using an old version of WordPress and an update button. You can update manually with the button. If you can’t see the button go to WordPress.org and download the latest update of WordPress. This new update will be downloaded to your computer as a zip file. Extract this downloaded zip file to your computer.

Find the folder that contains all the WordPress files. And continue by deleting the following items;

  • wp-config-sample.the php file.
  • wp-config.php – skip this step if you can’t see this file. Only those who see this file on their screen should delete it.
  • wp-content files also need to be deleted.

If you deleted the above items, you will need to upload the remaining folders to your server via FTP. A screen will appear for duplicate files by your FTP client. Check the “Overwrite” option to overwrite all files.

Finally, when these file downloads are also finished, the latest version of your WordPress website will be running. Now you need to check if you still get the error of MySQL extension missing error in WordPress.

Warning: If your version is old and is going to do the WordPress update manually, don’t forget to save a copy of your website. If you are using a version of WordPress that is WordPress 3.9 or lower, you will be missing the MySQL extension required by WordPress when installing PHP. If your WordPress auto-update feature is enabled, the main source of the error you are getting is not that your WordPress version is low, because your WordPress is already running in the most current version. At this point, you should research the source of the problem, and have to find what the new problem can be.

Update PHP WordPress

Don’t worry if you have not solved your problem by updating the WordPress version, or if you are already using an up-to-date WordPress version and you still have the MySQL extension missing error. When you still get this error, the point you should pay attention to right now is that you need to update the PHP version. If the PHP version of WordPress is not up-to-date, PHP will not be able to reach the required extension. If you are using a PHP version with PHP 5.6 or lower, the MySQL extension may be missing or incorrectly configured. So what will you have to do in this case?

  • First, you should check the current PHP version you are using. If PHP needs updating, you will need to update it.
  • You should check if the MySQL extension is installed.
  • You should check whether the PHP extension is configured correctly, if necessary, you will need to fix it.

How to Update WordPress PHP ?

Before determining the solution to the MySQL extension missing error, you will need to check which version of PHP your WordPress is working with. Once you determine which version of PHP you are using, you will take another step towards another solution. If you are using an older version, you need to update it. Older versions may be corrupted and cause your website to face errors. WordPress updates are not harmful, please take care to do so.

Learning the PHP Version

  • To find out if your PHP version is up-to-date, you will need to connect to the hosting / server provider of your WordPress website using FTP. You can get your FTP id from this provider.
  • If you are a cPanel user, you can use the cPanel file manager tool.
  • Connect to your server, then you need to create a new file named phpinfo.php in the WordPress root directory. This should be in the file containing wp-config.php.
  • Next, edit the following snippet of this file by pressing “edit”and adding this code.

            <?php phpinfo(); ?>

  • Save the file.
  • Go to yourdomain.com/phpinfo.php link and don’t forget to replace it with your real domain name (yourdomain.com).
  • You will see a screen with a lot of different information about the PHP configuration. Find the ”Core“ section, and then search for ”PHP version”. You will need to find the name of your own version, which can be written in the form of 5.6.8 or 7.2.25 etc.
  • If you do not prefer to apply any of these processes, you can request help from your hosting/server provider company to tell you that you need to find out your current PHP version and update the PHP version to the latest one.

Which PHP Versions Need Updating?

  • If the PHP version you see on the screen of your server starts with version 7, it may mean that you need a WordPress update.
  • If you see the version you still use is 5.x, it is completely predictable that your WordPress cannot access the MySQL extension.

It will always be for your best to use the last versions of WordPress and PHP. Improvements have been made to the latest versions; trust me with the latest versions, safety improvements are also made.

If your PHP version is under 7.4, you may not be able to receive security updates. Older versions will not work as well as the latest ones. Please make sure to use your WordPress and PHP with the most up-to-date version. You also need to make your plugin and theme updates properly and on time.

When you follow the steps given above, and  you still continue to face the MySQL extension missing error, maybe it is the best solution for you to ask your server/hosting provider to help you.

0 Comment

Get More Sprit
Related Articles
Dive deeper into similar topics with our recommended articles.