Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
    
thx for the help :) –  swapnesh Dec 6 '12 at 12:32
add comment

You can use the following MySQL query:

UPDATE wp_posts SET post_content = REPLACE (
post_content,
'http://www.mylivesite.com',
'ttp://localhost/mylocalsite');

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

share|improve this answer
    
thx for the link ... serialize data is actually a prob creator while doing something like this in the db :( –  swapnesh Dec 10 '12 at 3:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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