DEV Community

theoretician
theoretician

Posted on

Wordpress Installation: Error establishing a database connection

Hi Dev's, I need some help.

I have a Digital Ocean droplet, and I was trying to install WordPress on my domain, but I am getting an error message that "Error establishing a database connection".

The tutorial I'm following How To Install WordPress with LAMP on Ubuntu 16.04

Not sure what I have done wrong. Any ideas would be helpful.

Top comments (3)

Collapse
 
leslieongit profile image
Leslie

Check your wp-config file at Database host settings, sometimes localhost won't just work so you can replace it with your database ip address

Collapse
 
aswathm78 profile image
Aswath KNM

reboot your system . Works most of the time.

My specific problem was I entered a wrong password on the DB file. Check that too

Collapse
 
theoretician profile image
theoretician

Thank you guys for the reply. It got fixed and completed my wp website. 💯

Btw, Sorry for the late reply. 😬