Publisher Theme BetterStudio
English
  • العربية
  • فارسی
  • Publisher Theme
  • WP Plugins
  • Blog
    • Learn WordPress
    • Learn Marketing
    • Learn Design
    • Learn Shopify
    • Login
    • Create Account
Download Publisher
Publisher Theme <
  • Publisher WP Theme
    • Features
    • Demos
    • Showcases
    • Changelog
    • Support
    • Documentation
    • Publisher vs Others
      • Newspaper vs Publisher
      • Soledad vs Publisher
      • Jannah vs Publisher
      • Good News vs Publisher
      • JNews vs Publisher
      • MagPlus vs Publisher
      • Newsmag vs Publisher
      • SmartMag vs Publisher
      +
    +
  • Pricing
  • WP Plugins
  • Blog
  • Login
  • Create Account
Download Publisher
English
  • العربية
  • فارسی
Learn WordPress
  • All
  • WP Tutorials
  • WP Plugins
  • WP Themes
  • WP Hostings

Fix your PHP installation appears to be missing the MySQL extension error

Your PHP installation appears to be missing the MySQL extension error is a common error in the absence of MySQL extension on VPS while installing it.

May 12, 2020
0

One of the common errors that occurred while installing WordPress on a new VPS is Your PHP installation appears to be missing the MySQL extension error. This error occurs when MySQL extension doesn’t exist on the VPS. By default, many operators don’t have this extension.

If you face this error while working on your WordPress website, you don’t need to worry about it. There are many other reasons for this error. A lot of WordPress users deal with this issue.

In this article, we discuss 5 easy ways to fix this error. By following the steps below, you can fix “Your PHP installation appears to be missing the MySQL extension” error.

In our previous article, we discussed how to increase PHP memory in WordPress.

Table of Contents
How to Fix ‘Your PHP installation appears…’ Error
1. Check and install PHP MySQL extension
Install PHP MySQL on servers compatible with RedHat or Ubuntu
2. Review MySQL extension directory configuration
3. Make sure MySQL.so and MySQL.DLL files exist
4. Check php-mysqlnd-ms packages in Ubuntu servers
5. Check PHP configuration from suPHP_CinfigPath
Conclusion

How to Fix ‘Your PHP installation appears…’ Error

As mentioned above, in this article, we introduce 5 methods to fix Your PHP installation appears to be missing the MySQL extension error.

1. Check and install PHP MySQL extension

By default, PHP MySQL extension doesn’t exist on most system operators. PHP uses this module to send commands to SQL and receive them from MySQL.

To install PHP MySQL extension, you need to create an info.php file.

To do so, you need to download Notepad++ and launch it. Copy and paste the code below and save the file as info.php:

<?
phpinfo();
<?

Upload the saved file in your root directory.

To install PHP, open http://www.yourdomainname.com/info.php in your browser.

Go to MySQL Support. If you have MySQL installed, its version is displayed next to the Client API version. If you haven’t installed MySQL, follow the steps below:

Install PHP MySQL on servers compatible with RedHat or Ubuntu

Based on your PHP version, run the commands below. Keep in mind, commands below only work if your server is compatible with RedHat.

Version 5:

#yum update
#yum install php-mysql

Version 7:

#yum update
#yum install php70w-mysql

Run Apache or PHP-FPM.

To fix Your PHP installation appears to be missing the MySQL extension error in Ubuntu servers, run the commands below. Commands are different for each PHP version:

Version 5:

#apt-get update
#apt-get install php5-mysqlnd

Version 7:

#apt-get update
#apt-get install php7.0-mysql

Rerun the server and check if the error is gone.

2. Review MySQL extension directory configuration

Sometimes by following the steps mentioned above, you still get Your PHP installation appears to be missing the MySQL extension error. This error could happen if your MySQL extension directory has the wrong configuration. This occurs when you transfer your WordPress website or use a new VPS. To fix this issue, you need to check the “extension_dir” in your PHP.ini file.

Open the info.php file you created in the previous step. Look for “Loaded Configuration File” parameter and copy its value. For example:

Your PHP installation appears to be missing the MySQL extension

Now check the “extension_dir” section. Make sure the PHP extension is not empty or it has the correct path. For example:

Your PHP installation appears to be missing the MySQL extension

Compare “Loaded Configuration File” and “extension_dir” parameters with each other. If your “extension_dir” value is different to your PHP version path, make sure you correct it. To do so, type in the correct path in your PHP.ini file.

3. Make sure MySQL.so and MySQL.DLL files exist

The PHP.ini file is customized in some websites. This file won’t be updated when you update your PHP or transfer your server. On the other hand, in files like PHP.ini, you may misspell extension directory paths.

The best solution to this issue is to delete the lines below or convert them to comments in your PHP.ini file:

;extension=mysql.so
;extension_dir=/path/to/extensions/

4. Check php-mysqlnd-ms packages in Ubuntu servers

Your PHP installation appears to be missing the MySQL extension error also occurs in the newer versions of Ubuntu system operator. Because Ubuntu uses local MySQL drives instead of using the old PHP library. Installing php5-mysqlnd-ms package can fix this error. To do so, run the command below:

#apt-get install php5-mysqlnd-ms

To check for all packages that include MySQL, run the following command:

Ubuntu:

#apt-cache search mysql

RedHat:

#yum search mysql

5. Check PHP configuration from suPHP_CinfigPath

PHP files that are personalized are uploaded with suPHP_CinfigPath. However, this ability is available to servers with suPHP enabled.

If these files are configured in the .htaccess file, you can easily fix this error. This error is due to entering values that are different from MySQL extension values. Especially in shared servers like Plesk, cPanel, and WHM.

To fix this error, you need to deactivate suPHP_ConfigPath in .htaccess file. If Your PHP installation appears to be missing the MySQL extension error isn’t fixed, you need to check your PHP.ini file.

Check the values in PHP.ini and correct them.

Conclusion

In this article, we discussed Your PHP installation appears to be missing the MySQL extension error.

We learned that this error usually occurs when you update your PHP or transfer your website to another server. With 5 easy methods, we can fix this error. We checked the PHP.ini configuration to fix this error. In addition, we learned how to check different packages in Ubuntu and R

Please Share This:

Leave a Reply Cancel reply

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

Publisher Theme

All-in-one WordPress Theme for Magazines, Newspapers and Blogs

WordPress Publisher Theme For Newspaper and magazine and blog Get Publisher
Content Protector

Prevent content copiers from copying your website texts, images, videos, and source code

Protect Your Content
  • Home
  • Blog
  • 📙 WordPress Tutorials
  • Fix your PHP installation appears to be missing the MySQL extension error
Get the Latest Tutorials by Subscribing to Our Newsletter
Subscribe to our newsletter to be notified on new post and product releases.
BetterStudio
  • Contact us
  • Advertise
  • Custom Development Services
  • Blog
Products
  • Publisher Theme
  • Better Ads Manager
  • Our Plugins
Useful Links
  • 30 Days Refund Guarantee
  • Refund Request Form
  • BetterStudio Affiliates
  • Affiliate Payout Request
Support
  • WPShield
  • Publisher Theme
Connect
  • Follow on Twitter
  • Join us on Facebook
  • Follow on Instagram
Copyright © 2025 — BetterStudio. Terms & Conditions — Privacy Policy