Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress How to Build a WordPress Theme Content Strategy with WordPress Installing and Setting Up WordPress Locally

Error establishing a database connection wordpress

This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down. What Is the Probleme Please !!

2 Answers

Andrew Shook
Andrew Shook
31,709 Points

Fatni, what server stack are you using? XAMP, MAMP, WAMP? Make sure the server is turned on. Also, depending on which server stack you are using, you may or may not have a server password. Check the documentation for you stack to make sure you are using the correct default password for your Database.

Andrew, i'm using XAMP, how can i Check the documentation ? please

Andrew Shook
Andrew Shook
31,709 Points

According to a google search XAMP's DB doesn't have a default password. You should be able to leave the password field in the WP setup blank. The ROOT username for the DB is "root".

Thanks Bro it's Work