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

Nazaam Kutisha
Nazaam Kutisha
7,667 Points

Websites How to Build a WordPress Theme Content Strategy with WordPress Installing and Setting Up WordPress Locally Wordpress install not connecting with the XAMP serverlocal host.

http://teamtreehouse.com/library/websites/how-to-build-a-wordpress-theme/content-strategy-with-wordpress

I was able to install xamp server on my PC. However I have not been able to install Wordpress on the XAMP server. All required inputs are typed in, database name, user name ect. When I click submit I get the error page below. What is the reason for this?

The Error Page I get:

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

George Offley
George Offley
Courses Plus Student 7,386 Points

I had a similar issue, in addition to making sure that Apache is running, is MySQL also running. That what I was doing wrong.

Nazaam Kutisha
Nazaam Kutisha
7,667 Points

Thanks for the feed back. Yes, MySQL is started as well.. .

1 Answer

I had the same issue, You have to make sure that username and pass is the same as the one for XAMPP. That worked for me.

Nazaam Kutisha
Nazaam Kutisha
7,667 Points

Thanks that worked. In XAMP root has no password; so simply using root in username field and leaving the password blank did the trick.

Good stuff =)