We will be solving Error “Your PHP Installation Appears to Be Missing the MySQL Extension Which Is Required by WordPress.”. So, this error usually happens when you do a Migration to a new Hosting which is running the new version of PHP, while your WordPress still running the old version of WordPress.
1. PHP Selector in cPanel
1.1 Changing Your PHP Version to Lowest Version
- You will need to log in to your Hosting cPanel, scroll down to Click PHP Selector.
- Next, PHP selector you will need to roll back your PHP to the Lowest Version, you can try to match the version with the version that you are previously hosted but if you cannot find that it can try the lowest version work on your way up. Click update to set it.
- Once you have done that go back through your website and do a refresh on the website.
1.2 Update PHP Version in cPanel
- Go to the cPanel to use the latest PHP version click on back, select the latest PHP version and click update.
- Next, Once you have done that you go back to your website and refresh your website.
- You may also revert to the previous PHP version but we would recommend upgrading PHP as there will, there may be compatibility issues in the future.
2. View cPanel Error logs
- Go back to the cPanel, Next Click on File Manager, error log and Click on View.
- So, The best way to troubleshoot this is to a debug or checking the error log.
3. Update WordPress
- Login to your WordPress Dashboard > Updates Click Please update now and Click Update Now button.
- You need to update on Your WordPress this is to make sure there are the latest WordPress will support the latest PHP that You are hosted on Okay now You have successfully upgraded to the latest version WordPress.
4. Update the PHP Version
If your website is upgraded to a PHP version higher than 7.0 and you see this error, you should update your WordPress core version and plug-ins to use the new MySQLi or PDO_MySQL extensions instead.
5. Check your php.ini and .htaccess
A good place to look for is you need to look if there are any php.ini on your root website folder or you need to check your .htaccess for any customized code.
So, from here onwards there are no one-size fits all solutions and issue it depends very much on what you are facing and you need to troubleshoot accordingly.