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 trialTravis Granger
2,745 PointsHow to Move Live Site onto Local Machine?
I have spent a lot of time trying to get my existing live site to my local machines but all the materials / tutorials available are very disjointed and confusing. I am using amazon ec2 as my server and have successfully installed / activated FileZilla. The issue I am having is primarily with phpmyadmin and getting my current / live database to appear in the console so I can export. I know I can likely use a plugin for this but I would really like to know why it does not appear in phpmyadmin.
I would appreciate any direction and/or resources you might be aware of that could help me navigate this confusing process.
Thanks!
Travis Granger
2,745 PointsColin - that is correct. I appreciate you taking the time to consider this issue.
-Travis
Colin Marshall
32,861 PointsI'm guessing that either you are logged into the wrong phpmyadmin or the user you are logging in to phpmyadmin with does not have privileges for the databases.
4 Answers
Travis Granger
2,745 PointsOk. After a lot of research and trial and error, I was able to get this set up. For those who are interested, I found this link to be particularly helpful: https://managewp.com/how-to-create-a-local-copy-of-a-live-wordpress-site
Hayden Evans
15,399 PointsI followed this and still ran into some errors getting the local copy to work. Did you do anything in addition to what was mentioned in the article you linked?
Travis Granger
2,745 Pointswhat are the specific errors / issues you're having? I'm sure I had them all...
Hayden Evans
15,399 Points"Error establishing a database connection". I followed his instructions to replace the site_url and home fields in the options table with "http://localhost/yourfoldername/" under phpMyAdmin but to no avail.
Travis Granger
2,745 PointsCheck your wp-config file and make sure all the info in there matches up. Just to confirm, did you create a new database (and name it just like it's names in the wp-config file) and upload a backup of your database?
Hayden Evans
15,399 PointsI just imported as the article suggested
Travis Granger
2,745 PointsIf what I described does not sound familiar, then you've skipped an important step.
Also, I found this video to be useful: https://www.youtube.com/watch?v=-xu1zWxNBh0
Hayden Evans
15,399 PointsI found out what was wrong. The instructions in that blog post tell you to use 'localhost' as the DB_HOST when you create the database and import but they fail to tell you to go back and change the host name in wp-config.php to 'localhost' to match. Thanks for your help though!!!
Colin Marshall
32,861 PointsColin Marshall
32,861 PointsFor clarification, you're saying the databases for your live sites don't show up under phpmyadmin?