Database Error, and other subsequent errors!

1) Website at was working fine and Dandy (Digital Ocean + Server Pilot)
2) Used WPMUDEV to check score on speedtest and efficiency etc, initially error, then 100/100
- I was not expecting such a high score, so went to website URL, was recieved with the following
3) "Error Establishing A Database Connection"
- went through normal google and find answer , here and there, not so proficient on commandline, add the fact that serverpilot admin and logins were not what they were supposed to be (ex co-worker did shoddy job of both website and this, hence ex)

4) Thought problem possibly corrected, when page refreshed, met with
Parse error: syntax error, unexpecte'if' (T_IF) in /srv/users/serverpilot/apps/ashton/wp-config.php on line 85

line 85 referred to absolute path. So, root access server and reassigned directories

5) could not figure out what the issue , because this time around, website has the following error.
Parse error: syntax error, unexpected '$table_prefix' (T_VARIABLE) in /srv/users/serverpilot/apps/ashtonint/public/wp-config.php on line 68

Debug mode is off, allow WP repair, I added today, but it wont even let me get to that. Please help!!

Q1) What the hell on earth went wrong?
Q2) How do I get my site up and running again ?


  • Luís

    Hi A ,

    Hope you're doing well today!

    That error( Error Establishing A Database Connection) means that WordPress can't connect to the database because the credentials are wrong ("databse name", "username", "password").

    However, if all of those credentials are right, for some reason, the MySQL server was down or the site can't connect to it (it already happened to me).

    Parse error: syntax error, unexpected '$table_prefix' (T_VARIABLE) in /srv/users/serverpilot/apps/ashtonint/public/wp-config.php on line 68

    Check if everything is right in the wp-config.php file, especially in the line:

    $table_prefix = 'wp_';

    Maybe don't have the ";" at the end of the line.

    I hope this information has been helpful. If I can help you in this or other questions, please let me know!

    Cheers, Luís

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.