Php Installation Appears To Be Missing The Mysql Extension

How to Fix WordPress Error Missing MySQL Extension Problem

Trying to install WordPress or visit your WordPress site only to encounter 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, it can be frustrating to encounter a problem that prevents you from using/accessing your WordPress site.
However, don’t despair!
Generally, this error means that something is going wrong with the code on your site and something is preventing WordPress from being able to connect to its MySQL database.
In this article, we’ll go over what that “something” might be and share some tips on how to troubleshoot and fix this error message.
What Causes the WordPress Missing MySQL Extension Error?
As we mentioned 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/scripts on your server.
Specifically, this error means that the PHP on your server doesn’t have the necessary extension to connect your WordPress site to its MySQL database.
There are two main reasons why this might be the case:
1. You’re Using an Outdated Version of WordPress with PHP 7+
If you’re using a very old version of WordPress with a modern version of PHP, you might encounter this error because PHP 7. 0 deprecated the MySQL extension in favor of MySQLi. That is, PHP 7+ no longer includes the MySQL extension that WordPress is looking for.
Modern versions of WordPress will instead use the newer PDO_MySQL or MySQLi extensions. However, older versions of WordPress (below version 3. 9) might cause this problem.
2. You’re Using PHP 5. 6 or Lower but the Extension Is Missing or Improperly Configured
The other likely cause is that you are using PHP 5. 6 (before the MySQL extension was deprecated), but the extension is either missing or improperly configured.
If you’ve ever seen this error then you know how frustrating it is to be unable to access your site. Luckily, solving this is a quick fix. Click below for the full walkthrough! Click to TweetHow to Fix “Your PHP installation appears to be missing the MySQL extension which is required by WordPress”
Now that you know what’s going on, let’s go over some tips for how to troubleshoot and fix the issue.
1. Check What Version of PHP You’re Using
The first step to diagnose this issue is to figure out which version of PHP your WordPress site’s server is running. The answer to this question will dictate the next steps that you take.
To check this, connect to your WordPress site’s server using FTP. You can get your FTP credentials from your web host and you’ll also need an FTP client to connect.
If your host is using cPanel, you can use the cPanel File Manager tool.
Once you’ve connected to your server, create a new file called in the root directory of your WordPress site. This should be the same folder that contains your file.
Then, edit the file and add the following code snippet:

Once you save the file (and re-upload the saved version if needed), navigate to, making sure to replace with your actual domain name.
You should see a screen that displays a lot of different information about the PHP configuration on your server. Scroll down to the Core section and look for the PHP Version item. Pay attention to the numbers – you should see something like x. x. E. g. 7. 2. 25 or 5. 6. 8:
How to check your WordPress site’s PHP version
If your PHP version starts with a “7”, that usually means that you need to update the WordPress software. On the other hand, if you’re still using PHP 5. X, you might be missing the MySQL extension.
Want to know how we increased our traffic over 1000%?
Join 20, 000+ others who get our weekly newsletter with insider WordPress tips!
Subscribe Now
Note – at Kinsta, we strongly recommend using the latest version of PHP. In fact, we don’t support versions below PHP 7. 4. These older versions have slower performance and, because they no longer receive security updates, could pose a security risk to your site.
Learn more about why it’s important to use modern, supported PHP versions.
2. Update the Core WordPress Software
If your server is using PHP 7+, the most likely cause of this error is that you’re running an old version of WordPress. If you’re using WordPress version 3. 9 or lower, that can trigger this error.
Therefore, the fix is to update your WordPress software, which will also come with lots of other features, security, and performance improvements.
To manually upgrade your WordPress version, first, make sure you have a backed up version of your site. Then, go to and download the most recent copy of the WordPress software.
Once you’ve 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 file.
The file (you might not see this file – just make sure to delete it if it’s there).
The wp-content folder.
Once you’ve deleted those items, upload the remaining files/folders to your server via FTP. When prompted about duplicate files by your FTP client, tell it to overwrite all files:
Reinstall WordPress by overwriting the existing files
Once the file uploads finish, your WordPress site should be running the most recent version and your issue should be fixed.
As a follow-up step, you should also make sure to update all of your plugins and themes to the latest versions as well. You can follow these guides:
How to update WordPress plugins
How to update WordPress themes
3. Check to See If the MySQL Extension Is Installed
If your server is still using PHP 5. 6 or lower, your server might be missing the MySQL extension that WordPress requires.
To check if this is the case, go back to the 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:
How to see if WordPress MySQL extension is installed
If you can’t find this information, that means the MySQL extension is not installed. The best solution is usually to reach out to your host’s support staff and ask them to install it for you.
Note – again, we highly recommend not to use PHP versions below 7. 4 because they no longer receive security updates and don’t perform as well as newer versions.
Unless you absolutely must continue using PHP 5. 6 or lower, a much better solution is to upgrade your server to PHP 7. 4+ instead of putting time into properly configuring an older version of PHP. You can follow our guide on how to update the PHP version of your WordPress site and how to install PHP on any server.
4. Make Sure PHP Extension Is Configured Properly
If you’re using PHP 5. 6 or lower and the extension is installed, the issue might be that it’s not configured properly. Two common issues are:
Uploading a file that’s intended for Windows servers when you’re using a Linux server
Incorrect file paths.
You can find the location of your file in the file that you created before:
How to find WordPress file path
First, we recommend backing up the existing file by downloading it to your local computer. Then, try deleting the file and see if that fixes the problem.
Summary
The “Your PHP installation appears to be missing the MySQL extension which is required by WordPress” message is a frustrating error to encounter because it seems so technical.
However, with the steps in this article, you should be able to diagnose and fix the issue.
Our recommended solution is to make sure you’re using the most recent versions of both PHP and WordPress.
If you use PHP 7. 4+ and WordPress 5. 0+, you should be able to automatically fix this error and get your site working again, while also benefiting from all of the other performance, security, and feature enhancements that come from updating.
Save time, costs and maximize site performance with:
Instant help from WordPress hosting experts, 24/7.
Cloudflare Enterprise integration.
Global audience reach with 28 data centers worldwide.
Optimization with our built-in Application Performance Monitoring.
All of that and much more, in one plan with no long-term contracts, assisted migrations, and a 30-day-money-back-guarantee. Check out our plans or talk to sales to find the plan that’s right for you.
Your PHP installation appears to be missing ... - RoseHosting

Your PHP installation appears to be missing … – RoseHosting

If you have received the “Your PHP installation appears to be missing the MySQL extension which Is required by WordPress” error, then this tutorial will be able to help you fix that. This error is triggered when the PHP code in your site is not compatible with the version of PHP your WordPress site is currently using.
More specifically, this problem is related to the outdated MySQL extension which was removed as of PHP 7. 0. In this tutorial, we will help you fix the problem with the PHP missing MySQL extension error, and help you complete the WordPress installation successfully.
Missing a PHP extension is not something you should be worried about. If you see the following message on your screen when trying to access the WordPress installation via a web browser, then you are one of the many WordPress users facing the same problem.
The error that you see should look like this:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
1. Connect via SSH and check the PHP version2. Create file3. Update the required packages4. Restart the Web Server5. Update PHP6. Search all the available packages containing MySQL7. Restart ApachePHP Extension for MySQL is Now Fixed
1. Connect via SSH and check the PHP version
To fix the problem, you should have SSH access to the server. Connect to your Linux VPS via SSH and check the PHP version which is currently in use:
php -v
2. Create file
You can also check the PHP version by creating a simple file in your public_html directory with the following content:

Once you create the file, open your favorite web browser and access the file.
3. Update the required packages
If you are running an Ubuntu VPS and PHP 7, then run the following commands:
apt-get update
apt-get install php7. 0-mysql
Installing a later version of PHP and the PHP MySQL extension should help you avoid the “PHP installation is missing the MySQL extension” error.
4. Restart the Web Server
Then restart your Apache service for the changes to take effect, or if you are using Nginx + PHP-FPM, then restart the PHP-FPM service.
5. Update PHP
In case you are running PHP 5, run the following commands:
apt-get install php-mysql
Restart the appropriate service for the changes to take effect.
6. Search all the available packages containing MySQL
To search all the available packages containing mysql, you can use this command:
apt-cache search mysql
On the other hand, if you are running a CentOS VPS and you have PHP 7 installed on the server, then run the following commands to fix the problem:
yum update
yum install php70w-mysql
7. Restart Apache
Restart Apache or the PHP-FPM service in case you are using Nginx + PHP-FPM as a web server.
If you have PHP 5 installed on your CentOS server, run the following commands:
yum install php-mysql
To search for all the available packages containing mysql, you can use the following command:
yum search mysql
PHP Extension for MySQL is Now Fixed
Once you install the MySQL extension for PHP, you can return back to your WordPress setup. If the installation went OK, the message about the missing MySQL extension should not be presented to you. You can now continue with your WordPress setup!
Of course, you don’t have to Fix the Your PHP installation appears to be missing the MySQL extension if you use one of our MySQL VPS Hosting services, in which case you can simply ask our expert Linux admins to help you Fix the Missing MySQL Extension Error in WordPress or install any other required PHP extension. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post on how to fix the “Your PHP installation appears to be missing the MySQL extension” error, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.
Enable MySQL extensions in PHP.ini - TestingDocs.com

Enable MySQL extensions in PHP.ini – TestingDocs.com

TestLinkTestLink TutorialsIntroductionOn this page, we will learn to enable MySQL extensions in for the TestLink application. If we are configuring and installing the TestLink application manually, we need to enable MySQL in the PHP IndicationWarning! Your PHP installation don’t have the MySQL extension mysql- without it is impossible to use settingWe can enable the MySQL modules in the configuration file. Locate the configuration file on the machine hard the file with an or add the following configuration parameters to the file. extension=mysqliextension=pdo_mysqlMySQL extensions are files on the Windows environment that are located in the ext folder of the PHP installation directory. We need to make sure to set the extension_dir directive to reflect the example:; On windows:
extension_dir = “c:phpext”

Frequently Asked Questions about php installation appears to be missing the mysql extension

How do I fix your PHP installation appears to be missing the MySQL extension which is required by WordPress?

Your PHP installation appears to be missing the MySQL extension which Is required by WordPressConnect via SSH and check the PHP version.Create Info.php file.Update the required packages.Restart the Web Server.Update PHP.Search all the available packages containing MySQL.Restart Apache.More items…•Apr 7, 2021

How do I enable MySQL extension?

Locate the configuration file on the machine hard disk. Open the file with an editor. Enable or add the following configuration parameters to the file. MySQL extensions are .

What is PHP MySQL extension?

PDO_MySQL is the most recent extension, where PDO stands for “PHP Data Objects”. Unlike mysqli which is specific to MySQL, PDO is a general database abstraction layer with support for MySQL. As such, it only implements features that MySQL shares with other databases.Mar 6, 2018

Leave a Reply

Your email address will not be published. Required fields are marked *