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

Miriam Hagan
64 PointsProblems with Wordpress development
So I'm totally new to the whole wordpress thing and the lingo that goes with it, but started the wordpress development course yesterday to get some skills up
I started building my wordpress site and database for the first time following the advice from the Treehouse course (first module).
However after downloading wordpress, and creating the database using the MySQL database wizard as instructed I found that I didn't get the same pop up screen as they did (where details of the database are filled and installation takes place).
I tried to fiddle with the databases, and the first error message I got was that the database wp-746 wasn't linked properly or something. The one I actually entered was anything_awc, which was a bit confusing.
After fiddling with the MySQL databases and usernames and deleting one called anything_wp746 (which I realise now I shouldn't have).
I now can't access my wordpress site/blog at all and if I start up my FTP server FileZilla it won't connect either.
Can anyone help?
Thanks :-)
6 Answers

D Berge
2,035 PointsThere are a couple ways to approach this. You could certainly start over with a clean install. or… in the wordpress directory there is a file called wp-config.php. You can see where the database login info is stored. When you run the installer WP edits this file and stores your database info here. This info needs to match the Database name and Password. If you have an existing database filled with content then you can edit this file to match it.
Look for the part of the file that says something like this and make sure it matches you database info:
/** The name of the database for WordPress */ define(‘DB_NAME’, ’name of database‘ );
/** MySQL database username */ define(‘DB_USER’, ‘User' );
/** MySQL database password */ define(‘DB_PASSWORD’, ‘your database password ‘ );
/** MySQL hostname */ define('DB_HOST', 'localhost');

Miriam Hagan
64 PointsHi again,
So I've done a search on m y computer and found wp-config-sample.php, I can't open this though.
Should I be following the instructions outlined on this site to do this? http://premium.wpmudev.org/manuals/wpmu-manual-2/creating-and-editing-your-wp-config-php-file/
Ps. When I try to connect via my ftp server I get this message: Status: Resolving address of anythingwithchocolateisbetter Status: Connection attempt failed with "EAI_NODATA - No address associated with nodename". Error: Could not connect to server Status: Waiting to retry... Status: Delaying connection for 1 second due to previously failed connection attempt... Status: Resolving address of anythingwithchocolateisbetter Status: Connection attempt failed with "EAI_NODATA - No address associated with nodename".
Thanks again,
Miriam

D Berge
2,035 PointsI haven't followed any of the Treehouse WP videos. So I'm a little confused about the steps you are taking.
A few quick questions: You mention your FTP application. Are you trying to build this WP install on your local machine? Or are you setting it up on a Web Host somewhere?
What is the URL of your WordPress site? Or the address of the error message? (this will answer my first question)
Also, this may help me help you. Which Treehouse WordPress session are you following? (there are many)

Miriam Hagan
64 PointsHi there,
Thanks, in answer to your questions:
- I'm setting up this WP install via a web host www.wephostingforstudents.com
- the URL of my site is anythingwithchocolateisbetter.com, I get the error message with the URL http://www.anythingwithchocolateisbetter.com/wp-admin/ 3.I've been setting this up using the Treehouse session "How to make a website with WordPress"
An detailed explanation of where I think went wrong is below, but basically I got confused and after installing WordpPress using the one-click install I went on to then try and install it manually (whoops). Then when I didn't get the pop up screen to create a configuration file to create a wp-config.php file I thought something must be wrong with my database and fiddling with this then meant I couldn't get access to my wordpress site.
Should I try a clean install of wordpress, if so, how?
thanks
Miriam
Detailed instructions: I following the Treehouse session "How to build a website using WordPress". The first module introduced the web host (Webhostingforstudents) and the registering of the domain name, both of which I did. In then goes on to installing wordpress using the one-click installation.
After this it describes installing wordpress manually, which I think is where I ran into trouble. Not realising I'd already installed wordpress.
I then followed their instructions to install in manually (the 5min wordpress install) using the FTP FileZilla and creating a database using the MySQL wizard available on the control panel cPanel.
I then continued to follow the manual instructions for installing wordpress, and I'd created the database, but I didn't get the instructions to create a configuration file to create a wp-config.php file. At this point my website on wordpress was still working.
So I went back into the MySQL Database via my control panel cPanel and deleted something called wp-746. Which I think meant I stuffed up the database. and Means I can't access my domain name.

D Berge
2,035 PointsOK - I’m assuming you have not created any content yet. So we’re not in danger of losing anything… Let’s try this first.
We need to start with an empty database. If you did in fact do an installation with “one-click” then WordPress automatically created some tables in the database and created a wp-config file. When you mistakenly started the manual process after one-click you overwrote some settings and confused WordPress so it could no longer communicate with the Database. Hence the Error warnings.
OK - so, If you haven’t already done this. Create a new, empty database and make note of the connection details (Database Name, Database Server location, and User and Password.)
Then - using FTP, go into the WordPress Directory and delete the wp-config file (if there is one). But KEEP the wp-config-sample.php”
Now browse to your website: http://www.anythingwithchocolateisbetter.com and you should get a message, telling you that you don't have a wp-config.php file and need to create one. Just click on the Create a Configuration File button. Then you’ll be prompted to input your database info and start a new installation.
The three important things are 1 - make sure you are starting with an empty database. 2 - Make sure you have the correct database info. 3 - Make sure you start without a wp-config file. The wordpress installation process will create the wp-config file and build the database tables automatically.
Let me know how it goes.

Miriam Hagan
64 PointsHi,
Thanks for this, and all your help.
As it turns out all I needed to do was to delete/uninstall the current word press installation, clear the databases and users from MySQL database and then install Wordpress via the one click install.
Low and behold everything works again.
Thanks so much for all your help.
ps. According to Web Hosting for Students this isn.t the first time a student (like me) accidently installed Wordpress twice. Treehouse should definitely update their video :-)

D Berge
2,035 PointsGlad you got it sorted out. Have fun!
Miriam Hagan
64 PointsMiriam Hagan
64 PointsHi,
Thanks for your help.
Could you clarify where this wordpress directory is located? Is it within the wordpress info I originally downloaded, then uploaded via my file transfer software/tool.
Currently when I try and access my site I get this message (in case this is helpful...):
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.
Thanks :-)
Miriam