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

PHP How to Build a WordPress Theme Extending WordPress Template Functionality Displaying Content in Custom Places

Darryn Smith
Darryn Smith
32,043 Points

How to Create a WordPress Theme – Trouble Installing Demo Site.

Hello!

At the start of Stage 06 of this course, the Teacher's Notes say: "f you decide to locally install the full demo WordPress site, user the username and password 'treehouse' to login”.

While I’m not yet sure how to interpret “… user the username…” I figured I’d try a few semi obvious interpretations once I got the site installed.

But I haven’t gotten that far.

Using the Import tab of phpMyAdmin, I tried to import the database included with the project download “database_wp_portfolio.sql” but couldn’t get it to work. I’m using MAMP 3.0 with MySQL 5.5.34. (and OS X 10.9.2 w/ Safari 7.0.3).

I get the error listed below. Any ideas?

Thanks in advance, Darryn Smith

SQL query:

WordPress : http://localhost/allisongrayce.com MySQL database backup

Generated: Thursday 18. April 2013 22:00 UTC
Hostname: localhost
Database: `wp_portfolio`
--------------------------------------------------------
--------------------------------------------------------
Table: `wpWPP_commentmeta`
--------------------------------------------------------

Delete any existing table `wpWPP_commentmeta`


DROP TABLE IF EXISTS `wpWPP_commentmeta`;


MySQL said: Documentation

#1046 - No database selected 

3 Answers

Andrew McCormick
Andrew McCormick
17,730 Points

Darryn Smith ,
Like Jimmy said, you need to create the "wp_portfolio" database first. Create the database in your phpmyadmin, then open the database and use the import option within that database.

Jimmy Hsu
Jimmy Hsu
6,511 Points

It seems like he means "use the username"? So I assume treehouse would be both the username and password?

The error you are running into seems to be that MySQL doesn't know what database to use, possibly because it doesn't exist. Try selecting the database with USE or creating it CREATE DATABASE. Double-check to see if you aren't just accidentally importing to the wrong area beforehand.

However, before you start tearing up your SQL DB I would recommend taking a step back and re-reading the instruction to be certain you haven't skipped over a step or done one out of order.

Darryn Smith
Darryn Smith
32,043 Points

Well, thanks guys, that's what I needed to know! Moving on!