Fix missing the MySQL extension. One of the most usual issues that several users experience after the installation of WordPress is your PHP installation appears to be missing the MySQL extension. The issue occurs whenever the PHP installation on the server is lacking the necessary MySQL extension that is needed by WordPress to create connections to the connected MySql database.
If you have encountered a similar issue(missing the MySQL extension) then don’t worry we will be discussing various ways to fix the missing MySQL extension error during PHP installation. However, this fix depends upon your hosting plan.
How to Fix Missing the Mysql Extension on Shared Hosting
For shared hosting users, in case you have installed WordPress on a shared hosting account and have disabled MySQL extension on your account then it is much possible that this error will occur. However, you can enable the extension by doing the following steps. This will help you to fix missing the MySQL extension error.
Step 1: Log in to your cPanel account.
Step 2: Search for the option “Select PHP Version” & then click on it.
Step 3: In this step, you need to modify the PHP version to the current or latest version from the dropdown.
Step 4: After selecting the PHP version as current, check on the option that reads “mysqli” and/or “mysqlnd” from the list of options presented and click save.
Step 5: After the completion of the above steps now verify your WordPress installation and be surprised as the error should be gone.
Note: You will need to contact your web hosting provider if your cPanel does not have the Select PHP Version option to make it enable it for you. Also, you can look for ByteNap’s web hosting plans that come with this feature enabled.
How to fix missing the Mysql extension on a cPanel Server
For cPanel server users with root access will require to enable and install the MySQL PHP extension with the help of the EasyApache 4 interface in WHM.
Step 1: You need to login to your WHM as root.
Step 2: Look for the option “EasyApache 4” & click on it.
Step 3: After completing the two steps you will be displayed a highlighted box “Currently Installed Packages”, and then click on the ‘customize’ button.
Step 4: Next Select ‘PHP Extensions’ and type mysql in the search box, and in results you will see the mysqlnd options.
Step 5: As per the requirement of the PHP versions, choose the respective mysqlnd extension. Also, you can select multiple version shown in the list.
Step 6: After the selection of suitable mysqlnd extensions click on “Review”, and then scroll down and click on the “Provision” button.
Step 7: After the installation has finished verify the WordPress installation and you will find that the error should be gone.
I hope this article would have solved all your issues related to your WordPress site. Hope you solve missing the MySQL extension error in WordPress. Also, you can see this article on Converting the WordPress website to HTML to improve website speed. ByteNAP provides Linux Virtual Server Hosting in affordable price with high-performance, pure SSD servers and 24/7 dedicated support.