Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Fix "Your PHP Installation Appears To Be Missing the MySQL Extension"

WordPress and other apps sometimes show this message. This guide shows how to turn the missing piece on.

Databases2 min read10 steps

What does this error mean?

PHP is the language that runs many websites, including WordPress. MySQL is the database where your site keeps its information. PHP cannot talk to MySQL by itself. It needs an extension. An extension is a small add-on that gives PHP a new skill.

The full message says: "Your PHP installation appears to be missing the MySQL extension which is required by WordPress." So PHP has no add-on for MySQL, or it is turned off.

Common causes

  • The mysqli extension is switched off for your PHP version.
  • You changed PHP version and the new one lacks the extension.
  • The PHP configuration file (php.ini) is broken or has a wrong line.
  • On a VPS, the PHP MySQL package was never installed.

Fix on shared hosting (cPanel)

  1. Log in to cPanel.
  2. Open Select PHP Version, or MultiPHP Manager to confirm your PHP version.
  3. Open the Extensions list.
  4. Tick mysqli. Also tick pdo_mysql if your app needs it.
  5. Save the changes.
  6. Reload your website.

If you do not see this tool, ask Hostvento support to enable the extension.

Check for a custom php.ini

  1. Open File Manager in cPanel.
  2. Look in your site folder for a file named php.ini or .user.ini.
  3. Rename it to php.ini.bak to test. The site will then use the default settings.
  4. Reload the site. If it works, the old file had a bad line.

Fix on a VPS or dedicated server (root access)

This needs root access. Install the package, then restart the web server.

yum install php-mysqlnd
systemctl restart httpd

On Ubuntu or Debian use:

apt install php-mysql
systemctl restart apache2

The first command in each pair installs the PHP MySQL add-on. The second restarts Apache so it loads the add-on.

Check that it is on

Make a file named info.php with this content, upload it, and open it in your browser:

<?php phpinfo(); ?>

Search the page for "mysqli". If you see a section for it, it is on. Delete info.php when done, because it shows private details about your server.

Tip: Older software may need an older PHP version. Check which version your app supports.

Quick recap

  • The message means PHP cannot talk to MySQL.
  • Turn on mysqli in Select PHP Version.
  • Rename a broken php.ini to test.
  • On a VPS, install php-mysqlnd or php-mysql and restart the web server.
  • Delete info.php afterwards.