Usually, this error will occur if you are using an incompatible PHP version with your current version of WordPress or if the WordPress version you are using is outdated. Changing the PHP version to a lower version, such as PHP 5.6, might solve this issue. The cause of this issue is an outdated MySQL extension that was depreciated from PHP 7.0.
Refer to Accuweb > Change PHP to change the PHP version from cPanel.
However, we recommend using the upgraded version of WordPress, and you can refer to Accuweb > Upgrade WordPress, which will show you how to upgrade your WordPress version in a few simple steps.