How to Solve “Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required By WordPress” Error
WordPress is the most popular open-source and powerful content management system (CMS) that allows users to easily maintain and publish content.
If you are trying to install WordPress or visit your WordPress site and only redirecting to an error message that says “Your PHP installation appears to be missing the MySQL extension which is required by WordPress”, then we just have the perfect solution for you.
We know this sounds bad but don’t despair! It only means WordPress is having trouble connecting to your MySQL database. In this article, we’ll examine what causes this MySQL error message and simply take a few steps to fix the issue.
Fluent Forms is the most beginner-friendly form builder. Download now and start crafting beautiful forms FREE!!!
Reasons behind “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” error
This “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” error message shows when your WordPress site runs with a PHP code that isn’t compatible with the PHP version which is currently used on your website.
For instance, if you’re using an earlier version of WordPress, say 3.8, with a more recent PHP version (greater than 7.0), you’re most likely to encounter this MySQL extension error.
You can face this error message for several reasons. Let’s go over the following.
- You’re using an old version of WordPress with PHP 7+
- You’re using PHP 5.6 or a lower version, but the extension is missing or not properly configured
- You’re using outdated plugins
This error usually occurs with new WordPress installations or if you recently migrated your website, switched OS that doesn’t include MySQL extension by default, like Linux, or changed your server configuration.
Whatever the case, one should know how to fix this annoying error. Let’s walk you through four simple ways.
How to fix “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”
Now that you got an idea of what’s going on, let’s go over some tips for how to troubleshoot and solve the issue.
- Check what PHP version you are using
- Update the core WordPress
- Check if the MySQL extension is installed
- Verify that the PHP extension is properly configured
1. Check what PHP version you are using
Before diagnosing what is causing the MySQL extension error, you should know which PHP version your WordPress site is running. There are two ways to do so.
If you’re able to access your WordPress dashboard, you can easily check out the PHP version from the dashboard.
Log in to your WordPress dashboard with your username and password. From the left side, select Tools → Site Health.
Now under the Site Health Status, you can see which version of PHP you’re running.
If it’s an outdated version, it’ll show under critical issue. If not, you can see the version in the Passed tests section.
If you’re unable to log in to your WordPress dashboard, you’ll have to access your website through an FTP client.
Log into your server using Filezilla or any other FTP client. Your FTP credentials are usually provided by the Web Host company you’re using.
Once you’ve connected to the server, open your public_html folder, which is the root directory of your WordPress site. This should be the same folder that contains the wp-config.php file.
Now create a black file and name it phpinfo.php. Then edit this file and add the following code snippet:
After saving the file, load it in a browser. Just type your website URL and add “/phpinfo.php” at the end. (It’ll look something like – yoursite.com/phpinfo.php)
You will see a screen with a lot of information about the PHP configuration on your site’s server. The version number should be listed at the top. If not, scroll to the Core section and look for the PHP Version item.
If your PHP version is greater than 7, then you may need to update your WordPress version.
In the next step, we’re going to discuss how to check and update your WordPress version.
2. Check and update your WordPress
Now, if you’re using PHP 7+ version with an outdated WordPress, you might see the “your PHP installation appears to be missing the MySQL extension which is required by wordpress” error.
WordPress 3.9 or lower version isn’t compatible with PHP 7+ versions, and that triggers the MySQL error.
Therefore the fix here is to update your WordPress, which will come with many other features, security, and performance improvements.
Can you still log in to your WordPress dashboard, you can easily update it within a few clicks. If not, we’ll show you how to do it manually.
Simply log in to your WordPress dashboard, and click on Updates. If your WordPress is updated, you’ll see the “You have the latest version of WordPress” above the “Re-install version Number” button. If not, you see “An updated version of WordPress is available,” just click on the Update Now button beneath the text.
Now, what if you cannot log in to your WordPress dashboard? Here’s what you have to do. You need to update it via an FTP client. Go to WordPress.org and download the latest version of the wordpress.zip file.
Extract the zip file and log in to your site’s server via FTP. Go to the wp-content folder. Now right-click on the plugins folder and rename it to “plugins.hold” which will temporarily deactivate your plugins.
Delete wp-admin & wp-includes folders. The next step is to upload the new wp-admin & wp-includes folders from the .zip file you extracted a bit ago. Now upload the individual files from the new wp-content folder to your existing wp-content folder. This will overwrite the existing files.
Rename your “plugins.hold” file to “plugins” again, and you should be all set. Your WordPress site should be running the most recent version, and your problem should be fixed.
3. Check if the MySQL extension is installed
If your server is running an earlier version of PHP (5.6 or lower), this might be missing the MySQL extension that WordPress requires.
To check that, head over to the phpinfo.php file that you loaded in your browser in the first step. Look for the row named “Client API version.” If the MySQL extension is installed, you should see a number in this row.
If you can’t find this row – it means the MYSQL extension is not installed. In that case, you can reach out to your hosting provider’s customer care and ask them to install it for you.
But we highly recommend not using PHP versions below 7.4. Update your PHP version to the latest so that you don’t need that extension and get overall better performance.
4. Verify that the PHP extension is properly configured
If you’re running the latest versions of PHP and WordPress but still seeing the “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” error text, then it’s possible that your PHP extension isn’t configured properly.
Again, return to your phpinfo.php file that was loaded to your web browser in step number one. Now find the row named “Loaded Configuration File,” and check out the file location of php.ini. Navigate to the location on the server using an FTP client.
Then, just download a copy of the “php.ini” file to your local computer. Delete the php.ini file and it should fix your problem.
Like any error in WordPress, the “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” is a frustrating message to encounter because it seems technical.
However, if you follow the steps we discussed above can resolve the issue you’re facing with no damage to your site’s UX. If you still face the error, contact your hosting provider or seek help from experts.
The most beginner-friendly, lightweight, packed-with-features form builder in the market. Download now to craft sleek, smooth, and responsive forms FREE!!!
Do you ever come across “Briefly unavailable for scheduled maintenance.” or “Sorry, this file is not permitted for security reasons” error text in WordPress? If so, no need to worry, you can find easy & simple WordPress bug fixing in our site.
Comment below if you want to add something. Follow our social media channels to learn tips and tricks of WordPress.
He loves to play in the arena of WordPress and learn new things every day. Whenever he’s not writing, he’s playing billiard or spending quality time with his family.