localhost redirects to remote site on load (2 posts)

  1. wendallsan
    Posted 3 years ago #

    Hi all, I'm attempting to clone an existing site to my local system to do some work on. I've updated the 'home' and 'siturl' options in the database, have changed the wp-config.php file to use my local database (cloned from the live site), have set up a virtualhost in apache with a serveralias and servername of [mysite].local and added a [mysite].local entry in my /etc/hosts file. Everything is set up to listen on port 80. But when I try to view [mysite].local, my browser is redirected to the live site at [mysite].com. Any ideas on what I've missed that may cause this?

  2. codex-m
    Posted 3 years ago #

    OK try examining your .htaccess to make sure there are no redirects in there. If you are updating the home and siteurl , it should point to your localhost installation such as:




    If WordPress is installed on the local host root.

    If you are using Firebug check the header status returned when you load the site in the browser, it can give you some clues.

    Also if you manually editing the site root index.php or header.php it might contain some script that automatically redirects it to your remote site.

    These are things that you need to check.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.