I just need to know if this is the only way to install wordpress from live to localhost.

I downloaded the files and database from live, then push the files folder to my htdocs folder, and uploaded the db through phpmyadmin and change the config file.

Upto this point I think im on correct side.

After entering http://localhost/mylocalsite URL in web browser site loads in correct way, however link seems to be still pointing the old (live site) URLs.

So for this I search my live site URLs in the DB like -- http://www.mylivesite.com and replace this with the http://localhost/mylocalsite URL.

So my question is if this is the correct way i am implementing it on my locals or some more appealing method i am missing.

2 Answers 2


Update your wp_options table.

Look for siteurl and home and change their values to point to your localhost, that is, http://localhost/mylocalsite. This should be enough to make your site work again.

You don't need to find and replace all instances where the old url is present. For example you should not change the guid of your posts.

Alse read this post on Moving Wordpress.

  • thx for the help :)
    – swapnesh
    Dec 6, 2012 at 12:32

You can use the following MySQL query:

UPDATE wp_posts SET post_content = REPLACE (

However, this doesn't replace any serialized URLs, which could cause problems. There's a search and replace script I use, which works well.

  • thx for the link ... serialize data is actually a prob creator while doing something like this in the db :(
    – swapnesh
    Dec 10, 2012 at 3:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.