loader

How to Solve “Your PHP Installation appears to be missing the MySQL extension which is required by WordPress”

Not long ago, when I was writing an article on the WordPress text editor page, an error message suddenly appeared, “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.” At the same time, the appearance of my website homepage is also inaccessible to visitors.

PHP

Besides the homepage that cannot be accessed by visitors, I also cannot enter the backend dashboard of my WordPress website with the same error message. The only thing I can do is access cPanel through the client hosting area.

Because this error was the first event that I experienced and didn’t know how to resolve the problem, I then tried contacting the hosting provider where I bought a hosting package.

When I sent a request to resolve the problem through an open ticket, soon I got a response from the hosting provider support team who said that it was possible because of the neglect of messages on the WordPress dashboard or many WordPress features did not support the use of PHP 5.6. I was then directed to read a guide about this at https://wordpress.org/news/2019/04/minimum-php-version-update/.

PHP

I am trying to find out if this problem is possible because of the WordPress theme configuration that I installed. But from communication with the theme developer, the source of the problem is not the theme they are making, but it is likely due to the core of WordPress itself.

After searching a few references on the internet for the above problems, I suspect a mismatch between the latest version of WordPress with the configuration or PHP version that is set on the hosting area. WordPress automatic update process to version 5.4.2 I suspect as the source of the cause.

Next, I entered my cPanel account to find out the PHP version installed there. Through the cPanel menu: [Software] – [Select PHP Version] – [PHP Selector], I obtained information that the installed PHP version is 5.6.

PHP version

I am trying to experiment changing the PHP version in [PHP Selector] from 5.6 to 5.5.38, which means lowering the version from before. But then another error message appears, “Your server is running PHP version 5.5.38 but WordPress 5.4.2 requires at least 5.6.20.”

Then when I access the WordPress dashboard, a message is found that says, “PHP Update Required. WordPress has detected that your site is running on an insecure version of PHP.” From this information, I make an assumption that when the WordPress core is updated to a higher version, a higher PHP version is also needed to be set in cPanel. An upgraded PHP version of cPanel is minimum to be the same as the updated PHP version of WordPress. PHP

Upon the emergence of the error message above, I then took the initiative to try to change the PHP version back to be higher, which is version 7. I do this by going back to the [Software] – [Select PHP Version] – [PHP Selector] menu, then changing the value to version 7. PHP

After the PHP version is changed, my WordPress can be accessed again in normal condition, both through the homepage and the WordPress backend dashboard. So if your website experiences the same error as I have experienced, you can try to take the steps that I took to avoid such error.

shares