Overview
This article provides information about a common WordPress MySQL error message and several ways to fix it.
Background
The following error may appear on your WordPress site when the PHP code in your site is not compatible with the version of PHP your site is currently using. More specifically, the issue is with the outdated MySQL extension, which was removed as of PHP 7.0::
If you're using any version of PHP above 7.0 and you're seeing this error, it's due to old code that needs to be updated. You must upgrade the core WordPress files to the current version, as well as any plugins your site is using.
How to fix the error
Fixing this error requires checking the PHP version on your site and making sure your WordPress code is up to date.
Checking the PHP version on your site
Check which version of PHP your site is using with a phpinfo.php file. Make sure it matches the version of PHP your panel displays for your domain.
Updating the code
If your website has been upgraded to a PHP version over 7.0 and you're seeing this error, it means you must update your WordPress core version and plugins to use the newer MySQLi or PDO_MySQL extensions instead.
Updating WordPress
DreamHost WordPress installations made via the panel are always set to update automatically. You should also check your plugins and manually update WordPress if needed: