Local with FoundationPress slow BrowserSync / Localhost

Doing a standard install of FoundationPress on top of a WP (4.7.3) / PHP (7.0.3) / Apache / MySQL (5.5.49) non-multi-site runs fine if I go directly to e.g. foundation.dev but anything related to BrowserSync, which opens up a localhost:3000 despite setting the URL to foundationpress.dev, runs very slow. It takes 5-10 seconds to reflect an update.

Has anyone else run into this issue and found a solution? I’m not sure how the localhost:3000 wrapper conflicts with the local .dev instance but it doesn’t jive well.

Also, I ran Mamp Pro and don’t have any problem accessing localhost setups. The .dev access point loads instantly on Local by Flywheel.

I’m at a loss and it’s really killing my workflow because I can’t run a simple watch command on a set of files without having to wait 5-10 seconds to see the change.

After tearing the little hair left out of my skull for 3 days and trying everything from adjusting DNS settings in OSX to praying to the /etc/host gods, I found the Local by Flywheel program assigns an IP to the local server name but the long hanging is in some way (from what I’ve researched) related potentially to IPV6. I didn’t make any adjustments to my network settings, but it doesn’t like it I suppose.

So, while this works out of the box as far as accessing foundationpress.dev in my /etc/hosts file: foundationpress.dev #Local Site

it takes a long time to work properly using FoundationPress’ npm run watch command which ultimately creates a localhost:3000 setup. To fix, I had to manually add this after “## Local by Flywheel - End ##”:

::1 foundationpress.dev

I’m sure in some cases, running this may help, which flushes the DNS cache after making changes to the hosts file:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder;

Now I can stop crying myself to sleep and start developing again.

1 Like

So this worked adding ‘::1 foundationpress.dev’
However, when I have more than one site that Im making changes to, what should I do?

Hi @spencersmb,

You can add that line for every domain that you’re working on.

Just a heads up, Local does this automatically as of the 2.2.0 pre-release. 2.2.1 will be the next public release that includes this.

1 Like


Hey thats great news! This is related to my earlier question about the remote host issue I had. I noticed that without this extra ::1 line for each domain - when running HMR or gulp to inject changes right away - the reload is EXTREMELY slow. Thankfully this solves both issues. Excited for the next update - its an amazing piece of software. Do you by chance know when it will be released?


1 Like

Fantastic news. works well