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

Zachary grace
Zachary grace
6,682 Points

From local host to live server.

Ok so I am working on another redesign for my site, and I am working on it locally. I have already done 1 local site and exported it to a live server. Now I'm trying to do it for a second time and I messed something up because it says error establishing a database connection on my website. I still don't understand php very well at all. I think i messed something up in phpmyadmin maybe l. Can anyone help me out?

2 Answers

Hi Zachary,

It sounds as though your database details could be incorrect. Have you checked the details in your wp-config.php match what you have for the live server database?

The Migrating WordPress from Local to Live Server should help to identify the steps involved and what way have been missed.

The Codex page for Editing the WP-Config file may also help.

Hope that helps

-Rich

Eric Amundson
Eric Amundson
19,530 Points

Zachary,

Rich is right — anytime you see DB connection errors in WordPress, your first stop should be to check your wp-config.php file.

If your database details are wrong, or there's another setting error in wp-config.php, the site won't work.

Make sure you've setup an empty database on the LIVE server and are connecting correctly to it (and not your LOCAL database).

Cheers!