Support » Localhost Installs » localhost redirects to remote site on load

localhost redirects to remote site on load

  • 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?

Viewing 1 replies (of 1 total)
  • 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.

Viewing 1 replies (of 1 total)
  • The topic ‘localhost redirects to remote site on load’ is closed to new replies.