Support » Localhost Installs » After update DB, home link on local redirects to live site

  • Resolved kanika


    A related problem:

    When I type http://localhost/myblog I get redirected to the live site on production server.(I have made the changes in the wordpress)

    When I type http://localhost/myblog/wp-admin, it goes correctly to the local site’s admin interface.

    Again from the admin interface, I can’t navigate to the local site cause it takes me to the production site.

    Strange behaviour.

    The changes I made:
    UPDATE wp_options SET option_value = ‘http://localhost/myblog’ WHERE option_value = ‘’;
    The permalink settings are as follows(default . does that matter?)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi.
    You are experiencing that problem because you need to use a search for your live site domain, say, and replace it with localhost/yoursite in your local database.
    That should fix the problem for you. If you are not very familiar with SQL queries or phpMyAdmin, you can use the Search and Replace plugin, which has a built-in sandbox feature.



    Thank you.
    Some links in the wp_options table were still to the live site.
    For general info:
    Its not just the ‘home’ record and the ‘siteurl’ record that needs to be changed, every instance of the live site url should be changed including the paths to images, that is if iamges exist on localhost.

    Thanks again,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘After update DB, home link on local redirects to live site’ is closed to new replies.