Recently I had a customer with a PHP Update Required error message on the backend. Maybe you’ve seen it. It looks like this:
Most control panels of hosting providers have a PHP Version section where you can easily update the version yourself, so I went in and updated the version for my client, but then got an “Error Establishing Database Connection” both on the front end and backend of the site.
To fix this, I needed to update the database password for the database user. To find the correct database password, I went to my wp-config.php file, which was in my site root, and found the lines that looked something like this:
Please note, have a backup of your database and files before making any changes. These types of changes can cause big problems if you’re not absolutely sure what you’re doing.
I then found the matching user in my control panel and updated the password. Viola! All fixed.