“Missing MySQL Extension” Errors with WordPress

If you see error messages saying “Your PHP installation appears to be missing the MySQL extension which is required by WordPress”, this is almost always caused by one of two things:

  • Using an outdated version of WordPress (earlier than version 3.9) with PHP 7.0 or later; or
  • Uploading a "php.ini" file that contains incorrect MySQL extension commands.

If the problem is caused by an outdated copy of WordPress with PHP 7.0 or later, you can temporarily switch back to an older version of PHP, update WordPress (as well as any outdated plugins or themes) from the WordPress dashboard, then switch back to a newer version of PHP.

If that’s not the cause, this can also happen if you upload a “php.ini” file that's intended for Windows servers instead of Linux servers, or that doesn’t list the correct MySQL database driver extension path. Since different copies of PHP use different settings for this, it is very difficult to copy php.ini files between different servers and have it work. You should simply delete the custom “php.ini” file you uploaded, and everything will work properly. If you need to change individual “php.ini” settings, see our PHP page.