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 trialJake Bolton
1,956 PointsMAMP and MySql
Hi Guys,
Sorry to throw this out there so close to Christmas, however I've been trying and failing to import a database from a live server to my localhost.
I've managed to set up the new site, and set up a new database, however I can't seem to import the pages/post content from the database.
The pages just don't seem to be there.
Could I be missing something?
Hope you could help guys.
Cheers, Jake
2 Answers
Zac Gordon
Treehouse Guest TeacherYeah, that's a good question. Can you see the new content in the database? For example if you go into the wp_posts table?
Jake Bolton
1,956 PointsHi Guys,
Thanks for your answers. It's becomming clearer what the issue is here.
Since I imported my database content from the current live site on the clients server. I have three sets of table rows in the database.
'0_' 'wpCLIENTNAME_' 'wp_'
Basically, when I set the table prefix to 'wpCLIENTNAME' the site doesn't work.
If I set the prefix to 'wp_' the site works but doesn't pull any content in from the database. :-/
I've never come across this before as I never usually do this kind of operation.
Once again hope you can make some sense of this.
Many thanks, Jake
Kostas Oreopoulos
15,184 Pointssorry but i hope you could be more "algorithmic" than "narrative" in order to make sense (my guess is that you are trying to import into an existing wp site with different table prefix, which wont work like that, but lets make it more clear)
a) What is the name of the database? (it is listed in phpMyAdmin) b) click on your database and you will see a list of tables for that database. What is the name of the posts table it should be "something_posts"
if you have "somthing_posts" and "somethingELSE_posts" and "somethingNew_posts" then it obvious that you tried to "merge" two databases with different table names.
Try importting into a completly new database (empty) and then use that one.
Kostas Oreopoulos
15,184 PointsKostas Oreopoulos
15,184 Points