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 trialAaron Connell
Courses Plus Student 1,031 PointsHaving Issues Installing and Setting Up WordPress Locally with Windows.
Error establishing a database connection 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.
Are you sure you have the correct username and password? Are you sure that you have typed the correct hostname? Are you sure that the database server is running? If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
Try again
4 Answers
Kevin Korte
28,149 PointsWhat are you using for your local server? XAMPP, WAMP...etc?
Do you know how to create a database first? How to enter that database info in the wp-config-sample.php file and resave it just as wp-config.php?
Trying to get an idea of what you know and what you don't know.
Kevin Korte
28,149 PointsAfter you created your database, did you click on the privileges tab, and create a new user and password to have access to that database? That is the user and password to enter into the wp-config file.
Matt Campbell
9,767 PointsWhat are you entering in the install pages? You can use the username of root and no password to just get you up and running. Of course, if going live, ensure you have created a new username and password on your database.
Zac Gordon
Treehouse Guest TeacherHey Aaron Connell how'd you end up working everything out?
Aaron Connell
Courses Plus Student 1,031 PointsAaron Connell
Courses Plus Student 1,031 PointsXAMPP, I did create a database on http://localhost/phpmyadmin/. I think my issue is entering the database info in the wp-config file.
I keep getting this:
Error establishing a database connection. 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.
Are you sure you have the correct username and password? Are you sure that you have typed the correct hostname? Are you sure that the database server is running? If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
Chris Denney
Full Stack JavaScript Techdegree Student 3,029 PointsChris Denney
Full Stack JavaScript Techdegree Student 3,029 PointsI am so lost. This isn't a good learning experience. It's ridiculous that there aren't windows based directions and I'm left trying to search for help.
Kevin Korte
28,149 PointsKevin Korte
28,149 PointsChris, where are you stuck exactly?