Maybe this is not a pure programming question.
I moved a copy of the wordpress installation from the webhost and put into my localhost.
And then I opened the web page from the localhost. when I hit the button of Login to WordPress admin panel, I expect the path would
http://localhost
but I got
http://www.mywebhost.com/
I don’t where I have to changed on the files so everything in the WordPress would not pointed to my localhost instead of the webhost
Read the official Moving WordPress article, it says some steps you need to do when migrating the site like going to the Administration â Settings â General and update the values of Site address (URL) and WordPress Address (URL) to the correct domain.
If it doesn’t work, you’ll need to replace the content of the DB to the new domain.