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

Cannot connect to server Error

I was working on the Convert Custom Post Listing Template lesson, at the end of the lesson I saw that the wordpress wasn't displaying the projects like in the video, I thought I may have missed some files so I copied the files from the site and pasted them into the folder. Well now it says it can't connect to the database, I did a file restore to before I pasted the files into the folder and still the same error of not connecting to the database. The previous project of mikes shirts still displays but not the Alliison Grayce blog. Any suggestions would be great, I'm just very disappointed I got this far into the project but I can't go back or forward.

2 Answers

Thought I would look at the wp-config file to see if anything was changed, it was. I tried changing it back but I still get the same results.

define('DB_NAME', '');

/** MySQL database username */ define('DB_USER', 'aevans27');

/** MySQL database password */ define('DB_PASSWORD', '');

/** MySQL hostname */ define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', '');

So I basically restore the project to before the lessons, it is back to what it used to be.