Problem accessing a second site's Local URL

… and now I’ve added a new site and it’s redirected to my previously created site. Tried everything I could think of. :expressionless:

Okay, so I hit the same problem where the second site would redirect to the first. What I discovered was that the hosts file (C:\Windows\System32\drivers\etc\hosts) had the same IP address for both sites. In the hosts file, I commented out the first site, cleared my browser cache and the second site now works.

I haven’t tried all scenarios but the state of Local at this point is that the 1st site is stopped. I’ll probably have to manually edit the hosts file again when I want to work on the first site. At this point it’s one site or the other.

Haven’t worked much with Local on my Mac so can’t comment problems on that platform.

Note: when you work on your hosts file the app you use must be running with admin rights. I use good old Notepad.

Local automatically added the other site’s entry into the hosts file when I started that site.

I have 8 sites in Local and they all have the same IP address in my hosts file. I think that’s how it is supposed to be. 7 of the 8 sites work just fine. Right now by most recently created site, #8, redirects to #7. I tried commenting out #7 from my hosts file (OS X 10.11) and flushed my DNS cache and emptied by browser cache and #8 still redirects to #7.

Here’s the Local section of my hosts file, URLs changed for confidentiality:

## Local by Flywheel - Start ## #Local Site #Local Site #Local Site #Local Site #Local Site #Local Site #Local Site #Local Site
## Local by Flywheel - End ##

Any news of a fix for this please Clay?


We haven’t seen this issue recently.

What version of Local are you on? Also, have you tried restarting the sites your having trouble with?

I’m using Local 2.0.6. I made the blueprint about a year ago, could this
have anything to do with it?

Yes - I’ve tried restarting sites. The only thing that worked for me was to
make the site from scratch (with the same url) but not use a blueprint.



It might be an issue with the domain not changing for some reason. There are a few places you can check:

  1. The database: Click on “Adminer” or “Sequel Pro”, go to wp_options and check the siteurl or homeurl and make sure they’re updated to the new site URL
  2. Web server config: Go to /conf in the site folder and check the nginx or Apache configs for the old domain