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 Make a Website with WordPress Installing WordPress The Famous 5-Minute WordPress Install

Kate Rose
Kate Rose
1,632 Points

Database setup for wordpress site

I am going through the famous 5-minute wordpress install and got to the point of setting up MySQL database; however, when i went to the wordpress admin login page, it isn't prompting me to connect mysql database to the site?

4 Answers

Can you upload a screenshot of what you see when you navigate to yoursite/wp-admin in the browser?

If you are presented with a login page, then you may have already installed wordpress correctly and can log in with the username and password you created. If you get a message saying there doesn't seem to be a wp-config file then you need to go through the installation steps and add your database info then create a username and password for your wordpress admin account.

Marcus Tisäter
Marcus Tisäter
4,886 Points

You have to setup your wp-config.php file.

Here is the CodeX for it http://codex.wordpress.org/Editing_wp-config.php

This should be in your file with the correct values:

Source: WordPress CodeX

// ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define( 'DB_NAME', 'database_name_here' );

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

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

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

Dave Berning
Dave Berning
17,365 Points

This may sound dumb but did you set up a database on your server? If you are using cPanel you'll see an option to create a database. Once you do that and link the user to the database, open the wp-config.php file. If for some reason there is only wp-config-sample the rename it wp-config. Edit the file by inserting the credentials and you should be good to go.

Wordpress doesn't create a database for you.

Marcus Tisäter
Marcus Tisäter
4,886 Points

yeah exatcly. If you are using MAMP there is a link to it on the phpmyadmin screen. Create database.

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Did you already do the 1 click install?