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

Bao Tran
seal-mask
.a{fill-rule:evenodd;}techdegree
Bao Tran
Front End Web Development Techdegree Student 18,959 Points

Stage 6 database_wp_portfolio.sql issue

Getting error starting up local website localhost/allisongrayce.com after imported from db dump database_wp_portfolio.sql . I have successfully done this in past stages no issue.

Now getting error display "Error establishing a database connection". Anyone has similar issue with this "wp-theme-development-stage-06" project files download?

Thanks,

Bao

3 Answers

Bao Tran
seal-mask
.a{fill-rule:evenodd;}techdegree
Bao Tran
Front End Web Development Techdegree Student 18,959 Points

I guess I am answering my own question here. With a little work of DiffMerge (yes, I am a Mac user), I manage to make it work.

Comparing the wp-config: the main differences are: 1) on line 19 database name need to be wp_portfolio and not wp_portfolio_stage6 . 2) on line 25 password need to be root and not password. Lines 36-39 is not needed and can be removed.

In the database_wp_portfolio.sql file itself, do a search and replace for couple of things:

Search for: http://stage6.allisongrayce.com Replace with: http://localhost/allisongrayce.com

Search for: wp_portfolio_stage6 Replace with: wp_portfolio

This seem to work for me. Please let me know if it works for you too.

Cheers.

Bao Tran
seal-mask
.a{fill-rule:evenodd;}techdegree
Bao Tran
Front End Web Development Techdegree Student 18,959 Points

While I don't have an answer to my own question. I do have a work around. My work around is to use stage 5 mysql dump and stage 6 content. Most of the contents will show up. Just have to do the coding piece. This help me get through the stage.

Bao Tran
seal-mask
.a{fill-rule:evenodd;}techdegree
Bao Tran
Front End Web Development Techdegree Student 18,959 Points

I found the issue. Hopefully Zac or a TeamTreehouse teacher can correct this.

Look like the SQL dump was for the site http://stage6.allisongrayce.com and not for http://localhost/allisongrayce.com .

Can someone update the SQL dump file in the wp-theme-development-stage-06.zip project files download please?

Thanks.