Your PHP installation appears to be missing the MySQL extension which is required by WordPress

When visiting your WordPress site, it's possible you may see this error:

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

This is most often caused by a PHP version customization in your .htaccess or phprc files.

Check which version of PHP you're site is using

First, check which version of PHP your site is using with a phpinfo.php file.

Make sure it matches the version of PHP your panel shows for your domain.

If there is a mismatch, there is a potential customization somewhere causing the versions to be different.

Check for customizations

Check your .htaccess file for PHP customizations

First, check the .htaccess file in your website's main directory. It will most likely be located here:

  • /home/username/example.com/.htaccess

Open that file in an FTP client or SSH. Check to make sure there are no lines referencing a different version of PHP.

Check your phprc file for PHP customizations

After confirming which version of PHP you're site is using above, check your phprc file. It will be located here:

  • /home/username/.php/php#.#/phprc

Make sure to adjust the php#.# to the version of PHP your site is using. Check your phprc file using an FTP client or SSH to ensure there are no customizations that could potentially cause an issue.

See also

Did this article answer your questions?

Article last updated PST.