Please Help :( Error establishing a database connection
-
Hello.
I am not an advanced developer. I am novice with limited knowledge, building theme based WordPress sites with visual composer plugins. I can access Cpanel and navigate through there and can follow instructions reasonably well to locate certain files and update the code within them. I am very passionate about learning a lot more and would be eternally grateful if the community can help guide me through a solution to this issue. I may need slightly more step by step than the advanced developer, but I am savvy and can follow instructions pretty quickly.
Intro:
I have the following websites built with WordPress (oldest one built 5/6 years ago, latest one built 1-2 months ago. All of these websites are hosted with TSOHost. Some time ago, TSOHost retired the gridhost server these sites were hosted on and migrated them to their new server. Since they did this, it appears that all my sites sit within one top level root folder (i’m not sure this should have been done as now an issue has occured with all of my websites.
Domains effected:
[ Many redundant domains removed ]
Issue:
As you can see, all websites (apart from shrewsburyflooring.co.uk) display the following message – Error establishing a database connection. I spoke to my hosts (TSOHost) who have helped identify the issue, however cannot assist me in correcting it.
Hosts response: I see that only the websites that are connecting to this specific database are
encountering this issue. define(‘DB_NAME’, ‘rainband_vbuo’);You have fatal errors on your files. PHP Fatal error: Uncaught Error: Call to undefined
function mysql_connect() in
/home/ewazkhk3oocp/public_html/wp-includes/class-wpdb.php:1810mysql()_connect does not establish the connection
This error occurs because
mysql_connect()
is an old PHP function that was removed in PHP 7.0. Your site is likely trying to use this deprecated function, which means it’s either running outdated code, or the PHP version you’re using is too new for the code.Basically every website set-up under public_html , any settings done in public_html will
affect the entire server.This is coming from the website files which are using old PHP functions and are not
updated.What fixes I have tried already:
- Updated server php to PHP 8
- Reset database password and matched it in config file
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.