Website down?

Status
Not open for further replies.

soulhaven

New Member
Messages
12
Reaction score
0
Points
0
I do apologize if there is already a thread for this, but I couldn't spot it.

I cannot visit or edit my website at the moment. It comes up (in very big type): Error establishing a database connection.

I noticed it the other day, but thought it might have just been a one-day thing. But it seems not. Could someone diagnose the problem? Is anyone else having issues? My website was Wordpress-based.
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
Check in the wp-config.php file that the DB_HOST is correctly set to localhost.
 

soulhaven

New Member
Messages
12
Reaction score
0
Points
0
OK... I just used Softaculous (or whatever its called) to install WP, so I have no idea where to find that )o: Sigh, if I didn't have to work as well as work on my book then I would study web design and know all this stuff...
Edit:
I found in my file manager a file called setup-config.php in the wp-admin folder.

I found two mentions of localhost:

<input name="dbhost" id="dbhost" type="text" size="25" value="localhost" />

case "define('DB_HOST'":
$configFile[$line_num] = str_replace("localhost", $dbhost, $line);

I have very little idea of what I am looking at....
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Log onto cPanel
Click on File Manager
Go to public_html
Scroll down the list of files and find wp-config.php
Click/select
Click on "Edit" icon (about middle way across) on top of File Manager
Edit as instructed.
Click on "Save Changes"
Edit:
EDIT/ADD:

I found in my file manager a file called setup-config.php in the wp-admin folder.

It is in the folder above that.
It is called wp-config.php
The line is near the top and it looks like

Code:
/** MySQL hostname */
define('DB_HOST', 'localhost');
 
Last edited:

soulhaven

New Member
Messages
12
Reaction score
0
Points
0
THANK YOU!!

The step-by-step instructions were exactly what I needed! Extremely grateful.
 

adamparkzer

On Extended Leave
Messages
3,745
Reaction score
81
Points
0
THANK YOU!!

The step-by-step instructions were exactly what I needed! Extremely grateful.

Hi soulhaven,

Now that you have been given a solution to your problem, and it seems like you are satisfied with the answer you received, I am going to close this ticket to mark it as resolved. Feel free to create a new support ticket if you need more help or have any additional questions.

- Adam
 
Status
Not open for further replies.
Top