Prevent wordpress from redirecting to your live website

Have you gotten yourself into a situation that goes something like this? You installed your wordpress on your web hosting. Then you realise that you need a copy on your local computer.

So logically you would install wamp, download the whole wordpress folder in your machine,  import back the database to mysql. Change the wpconfig.php, then you’re done. Right?

What will happen is when you test your local wordpress site by going to http://localhost/yoursite you’ll discover that it keeps redirecting you to your live website. This is clearly not what you want. So how do we prevent this?

This is caused by one of your wordpress table wp_option is storing your site’s url. Inside the table there are 2 records that you need to change. If you have permalink configured there  you need to modify .htaccess file. Worried? then Its easier if you follow the step by step solution for this: How to move your wordpress site. Follow from step 12 onwards.

Comments (2)

Istoselidon

December 11th, 2008 at 6:32 pm    


Great article and informativ. I have this bookmarked. Thanks

adrina

January 28th, 2009 at 3:12 pm    


Thanks a lot for posting this. Helped me with my own project. (wordpress newbie :))

Leave a reply

Name *

Mail *

Website