Local Community

Cannot switch between sites in Local

If I am working on one site in Local, I can no longer open a second site. Either at the same time, or after I logout of WP and close the first tab in Chrome. Quitting Local doesn’t solve the problem either. I have to restart my computer each time I want to work on another site.

When trying to open a new site, Chrome just spins for 10-15 minutes then I get a 503, or ‘Local router error.’

Not sure exactly when this started, maybe a few days or a week ago. The only thing I can think of is when Local switched to using .local instead of .dev domains. But not sure if that’s related.

Hi John,

It might be due to an IPv6 issue.

Can you open up your hosts file (sudo nano /etc/hosts on macOS’s Terminal) and add entries for the site’s you’re having trouble with?

The entries should look like (make sure you update the domain):

::1 some-local-site.local

Also, make sure it’s outside of Local’s block otherwise it’ll be removed.

Thanks Clay. That’s a little over my head. What does this mean?

“Also, make sure it’s outside of Local’s block otherwise it’ll be removed.”

Hi John,

Here’s a good tutorial that’ll lead you through the first thing I mentioned: https://www.imore.com/how-edit-your-macs-hosts-file-and-why-you-would-want

Regarding “Local’s block”, there’s a block of entries in the hosts file that’ll be between ## Local by Flywheel - Start ## and ## Local by Flywheel - End ##.

Just make sure you don’t put the new entries in between the start and end comments.

So, it should look something like this:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	    localhost
255.255.255.255	broadcasthost
::1             localhost

## This is what you want to add.
::1 some-local-site.com

## Local by Flywheel - Start ##
192.168.93.100 some-local-site.com #Local Site
192.168.93.100 www.some-local-site.com #Local Site
## Local by Flywheel - End ##

Ah right okay, I see. Thanks for the help and quick responses.

I guess I have to add every local site url, right? And then add each new one as I create sites in future?

Not ideal, as I have dozens in Local already. Will there be a fix for this in the future?

Local will automatically add it in the next update.

I would start by adding the lines for 2-3 sites to see if doing this even fixes this particular problem.

So, I’ve added some sites to the hosts file but the problem still persists. Sometimes a site loads, and then I’m in WP Admin and after a few clicks it’s back to the “Local router error” page. Then I’ll try again a few minutes later and it might load, but then back to the error within minutes.

And I’ve noticed I can no longer Export sites or create Blueprints anymore either. Everything just hangs. Even after multiple restarts and attempts.

Everything was working perfectly for months. I was in the process of moving my whole workflow over to Local and Flywheel, but now nothing works. It’s frustrating to say the least.

One thing, which may or may not be connected… from what I can remember, this all started roughly when I switched to using the Preferred environment in order to take advantage of Connect.

Also, I have MAMP Pro still installed on my machine and I use it.

What are next steps? How do we diagnose this?

@ViscoDesign,

Can you provide the log file after attempting to export a site? That may give us a clue into what’s going on as a whole.

Please see
"How do I retrieve Local’s log file?" for instructions on how to provide your local-by-flywheel.log file.

Manually adding this line to the hosts file worked. Not sure why the local app is not allow me to select the IPv6 Loopback option.