What should I check if WordPress says “Error establishing a database connection”?

What should I check if WordPress says “Error establishing a database connection”?

This message means WordPress cannot connect to its database. Possible causes include incorrect settings, insufficient permissions or a temporary database service issue. Note when the error appeared and whether you recently changed the database password or made changes to the website.

Check the database name, username, password and server address in wp-config.php against the details in your hosting account or documentation. Confirm that the database user has access to the correct database. Do not share these details publicly or start repairs or restores without understanding their effects. If the settings are correct, send your provider the exact error and the time it occurred, without including passwords.

RELATED QUESTIONS

Here are a few more questions whose answers may interest you. We answer important, practical questions for our customers.

SUBSCRIBE TO OUR NEWSLETTER

Join our newsletter. We only use it to share important information.

Newsletter subscription illustration