Want to install WordPress Or Visite your WordPress site. But you cannot access your WordPress site for an error that says, “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”?
As with any WordPress error message or problem, It can be hostels for any people that prevent you from accessing your WordPress site.
Don’t worry! you don’t despair about this problem.
However, this error means that something is going wrong with code and something is preventing WordPress from being able to connect to its MySQL database.
- Why Show The “WordPress Missing MySQL Extension Error.”?
- How to Fix “Your PHP installation appears to be missing the MySQL extension which is required by WordPress”
Why Show The “WordPress Missing MySQL Extension Error.”?
Already we mentioned that in the introduction, the error message “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” steps from some issue with the code/script on your server.
Especially, this error means that the PHP on your server does not have the necessary extension to connect your WordPress site to its MySQL database
There are two causes why show this error.
1. You’re Using an Old Version of WordPress With PHP 7+
If you’re using an old version of WordPress with a modern version of PHP you will see the problem or error. You might be encounter this error because PHP 7.0 deprecated the MySQL extension in favor of MySQLi.
However, PHP 7+ no longer includes the MySQL extension that WordPress is looking for. The modern version of WordPress will instead use the newer MySQLi extension. That cause doesn’t see the error. This is a reason WordPress Error Missing MySQL Extension Problem.
2. If you are using 5.6 or lower but the extension doesn’t properly configure.
The other cause is ” WordPress Missing MySQL Extension Error” for likely, you are using PHP 5.6 But don’t properly configure it. This is one of the main reasons WordPress Error Missing MySQL Extension Problem.
How to Fix “Your PHP installation appears to be missing the MySQL extension which is required by WordPress”
Now we teach you How to fix this problem. You can fix this problem in 4 different ways. let’s see how?
- Check What Version PHP You’re Using.
- Update The Core WordPress Software.
- Check and See If the MySQL Extension Is Installed
- Make Sure PHP Extension Is Configure Properly
1. Check What Version PHP You’re Using
The first step to solve this issue which is, to figure out which version of PHP your WordPress site’s server running. The answer to this question will dedicate the next steps that you take.
Check PHP version on cPanel:
- Login In Your “cPanel account”.
- Click On “Select PHP Version”.
- Click on “Current”
If your PHP version starts with “7”, That means you need to update your WordPress software. On the other hand, if you’re still using PHP “5”, You might be missing the MySQL extension.
If your PHP version is “5” you can easily Update it Click on the “Current” Option and choose the latest PHP Version.
2. Update The Core WordPress Software
If your server using PHP 7+, the most likely cause of this error is that you’re running an old version of WordPress software. Therefore, the fix is to update your WordPress software which will also come with lots of other features, security, and performance improvement.
To manually upgrade your WordPress version. First, make sure you have a backed-up version of your site. Then go to WordPress.org and download the most recent copy of the WordPress software.
Once you have downloaded it, extract the zip file to your computer. then, open the folder that contains all of the WordPress files and delete the following items.
- The “wp-config-sample.php” file.
- The “wp-config.php” file ( you might not see this file – Just make sure to delete it if its there)
- The “wp-content” folder.
Once you have deleted those items, upload the remaining file/folder to your server via FTP when prompted about duplicate files by your FTP client, tell it to overwrite files.
If the file uploaded finishes, your WordPress site will be running the most recent version and your issue should be fixed.
We are highly recommended this tutorial for you.
3. Check To See If The MySQL Extension Is Installed
If the server is still using PHP 5.6 or lower, your server might be missing the MySQL extension that WordPress required.
You need to do these three things.
- Go back to the phpinfo.php file that you uploaded to your server in Step #1
- Look for a section named either mysql or mysqli
- If the MySQL extension is installed, you should see a version number next to the Client API library version item.
If you cannot find this information, that means the MySQL extension is not installed. The best solution is usually to reach out to your hosts’ support staff and ask them to install it for you.
If you use PHP 5.6 or Lower and Extension is installed, the issue might be that ist not configure properly. There are two common issues.
- Uploading a “php.ini” file that’s intended for windows servers when you are using a Linux server.
- Incorrect file paths.
You can find the location of your php.ini file in the phpinfo.php file that you created before.
First, we also recommended backing up the existing file by downloading it to your local computer. Then try deleting the php.ini file and see if that fixes the problem.
In this post, we will provide you best way to solve “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.” this problem. I hope It is fully helpful for you and solves your problem. In the comments section please let us know how effective this post is for solving your problem. Thank you.