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

Maja B.
Maja B.
12,984 Points

Make a copy of local WP folder (localhost to localhost)

I'm following a course How to Build a WP Theme. I'm in the last section and I'm trying to do what Zac does in the video How to Migrate a Local WP Site to Live Server at localhost - So I'm trying to make a copy of my WP site on localhost. I guess the steps should be quite similar, but I'm missing somethink, because the copy of the folder is not successful.

Here is how I do it: <ul> <li>I make a backup of my current WP project that lives in htdocs/project1 (that is a WP folder) with BackUpWordPress plugin.</li> <li>I download it</li> <li>In confif.php I chane a database name (previous: wp_project1, new: wp_project2) <li>In phpMyAdmin on my localserver I create a new database named wp_project2 and Import the database that I've downloaded in step 2 (so the content of the database wp_project1) <li>on htdocs I open a folder project2 and copy all the files downloaded in step 2 in it. <li>I open my webbrowser and type in localhost(project2 - What I get is some sort of a page, but no images are there, no colors, though the fonts are for example - but ok, that its not such a problem as Zac gives instructins fow to fix that - by refreshing permalinks in dashboard etc. <li>BUT, I cannot get to the dashboard. if I call locahost/project2/wp-admin in "throws" me to http://localhost/project1/wp-login.php?redirect_to=http...localhost...wp-admin...reauth=1 - so back to project1. </ul>

Anyone knows how to solve that?TNX

3 Answers

Not sure I am quite understanding what you want to achieve but did you alter the Settings in Wordpress to the new location before downloading your database?

Maja B.
Maja B.
12,984 Points

No :) forgot it ... done now ... it works ... TNX!!

No problems pleased it worked and thank you for the Best Answer vote :-)