So, you have come across the obvious “Your PHP installation appears to be missing MySQL extension which is required by WordPress” error message.
There is no reason to worry. It has happened with many others.
We have received messages from our readers. That’s why we compiled this informational piece to assist all in troubleshooting and fixing the issue rapidly.
This issue is not new, and it appears every time when there is a change in the server configuration.
Let’s start the troubleshooting.
There are two ways to troubleshoot. We will describe the detail with code explanation.
When PHP needs to communicate SQL commands and retrieve responses from MySQL, then MySQL extension must be present.
It is an additional requirement of the PHP module, which is not installed by OS by default.
While troubleshooting, the easiest way to check whether the MySQL extension is installed or not is by creating an info.php file. It is the best response when you see the “Your PHP installation appears to be missing MySQL extension which is required by WordPress” error message.
Now, you must simply open a text editor and write the following code.
Now, you must save the file as info.php and upload it to your web hosting server in the root directory.
Now, you need to open the page on your web browser such as www.yourdomain.com/info.php
It will show you the PHP installation.
In the Client API version, if there is nothing visible, then you do not have PHP’s MySQL extension installed.
PHP MySQL installation on Red Hat Compatible severs
You need to run the following commands for installation.
# yum update
# yum install php-mysql
# yum update
# yum install php70w-mysql
After entering the code, you need to restart the server. It is necessary for changes to take place.
After the installation of MySQL extension, if the error persists, then your PHP’s MySQL extension directory is misconfigured. You need to fix it.
For fixing, you need to locate PHP.ini file and make sure it’s “extension_dir” value is used.
Now, you must open info.php file that is created in the first step in your web browser.
You need to locate the parameter known as “Loaded Configuration File.”
Note the path value of the parameter of “Loaded Configuration File.”
Now, you must locate the entry for the “extension_dir.” It has to be of some value. If it is blank, then it does not have a correct path to PHP extensions.
If there is an incorrect location in “extension_dir,” then you must put the correct value by opening PHP.ini file.
Your error will not appear again.
Have a good day, and work towards your success.
If there is any query left regarding this issue or any other website’s issue. Contact Us
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
|cookielawinfo-checkbox-analytics||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".|
|cookielawinfo-checkbox-functional||11 months||The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".|
|cookielawinfo-checkbox-necessary||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".|
|cookielawinfo-checkbox-others||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.|
|cookielawinfo-checkbox-performance||11 months||This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".|
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.