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 Local WordPress Development Local WordPress Development Installing a Local Web Server on a PC

Travis Granger
Travis Granger
2,745 Points

How 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!

Colin Marshall
Colin Marshall
32,861 Points

For clarification, you're saying the databases for your live sites don't show up under phpmyadmin?

Travis Granger
Travis Granger
2,745 Points

Colin - that is correct. I appreciate you taking the time to consider this issue.

-Travis

Colin Marshall
Colin Marshall
32,861 Points

I'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
Travis Granger
2,745 Points

Ok. 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
Hayden Evans
15,399 Points

I 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
Travis Granger
2,745 Points

what are the specific errors / issues you're having? I'm sure I had them all...

Hayden Evans
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
Travis Granger
2,745 Points

Check 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
Hayden Evans
15,399 Points

I just imported as the article suggested

Travis Granger
Travis Granger
2,745 Points

If 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
Hayden Evans
15,399 Points

I 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!!!