Sites won't work after starting sites on Local

What issue or error are you experiencing?

After clicking start site when I go to open site I’m getting an error on my browser (Chrome) saying “localhost refused to connect”. These sites were ALL working last time I worked on them one specifically today.


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

  1. Click start site on a existing site
  2. Click Open Site

System Details

  • Local Version: 9.0.5

  • Operating System (OS) and OS version: Sonoma 14.6.1


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

local-logs6.zip (766.4 KB)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Have you tried restarting Local or device yet?

What about changing your Router Mode to Site Domains? Preferences>Advanced>Router Mode

I just tried all, restarting Local and the device didn’t change anything, and changing the Router Mode to Site Domains shows a 502 error screen.

We had a bug with Instant Reload that was causing 502s on that Local release you are on. Are you utilizing that add-on? You can either disable it or if you upgrade to the latest Local release that should resolve the issue!

Keep us posted and we’d be happy to help further!

I’m not using the add-on so that’s not the issue, I also just updated to the latest version but the problem is still persisting. It’s weird because everything was working fine yesterday then all of a sudden, it just stopped working.

Are you able to create a new, blank site and access that okay?

Yup just tried that and everything looks okay for the blank site.

How many sites do you have in Local? Is there still plenty of disk space on your device?

Do you run any common security plugins on all your sites like Wordfence?

Are you running other developer applications simultaneously? Apps like MAMP, XAMPP, or Docker for example. I did notice some port conflict errors in the logs. They weren’t recent, but just wanted to check out any conflicts.

30 sites on Local with over 100gbs of free space on the device, I believe some sites have Wordfence but not all but before yesterday even the few with Wordfence were working fine. None of the ones listed but I may have had a Python Flask application running simultaneously with a Local site at the same time in the past.

Since you have so many sites I know it would be too cumbersome to try reimporting all of those. To get them all working again at the same time you might have to try deleting the lightning-services directory. The steps would look like this:

  1. Close Local
  2. Hit Cmd+Space and type ~/Library/Application Support/Local/lightning-services to navigate to this folder on your computer
  3. Delete the entire lightning-services folder
  4. Re-open Local
  5. Trying restarting a site that was having problems.

Really had high hopes for that fix lol but it didn’t do the trick

Sorry @jason_bourne! I can have our team take a look but we might not get back with anything until after the weekend.

For now, if there is a specific site you need to work on since new sites are working fine you could try a reimport. The steps would look like this:

  • Locate the site files on your machine, and save a copy of them to your desktop. If you click Go to Site Folder under your site name it should take you right to where they are located.
  • Once you have those copied, completely delete the site from Local
  • Restart Local
  • Reimport the site back into Local. You can refer here on how to Restore from only Local site files

Thank you! The temporary fix is working and should allow me to continue working for now

1 Like

Hi @jason_bourne! Thank you for your patience and communication with us here. Our Local devs were able to take a deeper look into your issue and come up with some replication steps and a fix. I’ll share what they gave me here below:

It looks like there are a number of errors for the various sites that look something like this:

{"class":"Process","level":"warn","message":"nginx: [emerg] open() \"/Users/hassanmomin/Local Sites/efbc-v2/logs/nginx/error.log\" failed (2: No such file or directory)","process":"nginx","thread":"main","timestamp":"2025-01-02T20:50:06.251Z"}
{"class":"Process","code":1,"level":"verbose","message":"PID: 23437 closed with","process":"nginx","signal":null,"thread":"main","timestamp":"2025-01-02T20:50:06.252Z"}
{"class":"Process","level":"warn","message":"[02-Jan-2025 14:50:06] ERROR: failed to open error_log (/Users/hassanmomin/Local Sites/efbc-v2/logs/php/php-fpm.log): No such file or directory (2)","process":"phpFpm","thread":"main","timestamp":"2025-01-02T20:50:06.271Z"}

For some reason, neither php, nor nginx are able to start because of some missing log files.

I think I replicated the error state with:

* Start local and create and/or start a site
* Click the “Go to site folder”
* With the site still running, delete the logs folder
* Quit Local and restart it
* Try starting the site and note that the site appears to start in the Local UI, but when you try to access it in the browser, there are errors. Additionally, those similar entries as above are found in the Local log.

I was able to fix things by quitting Local, then creating the folders again for both nginx and PHP:

~/Local Sites/<sitename>/logs/php
~/Local Sites/<sitename>/logs/nginx

As far as why this happened, it does appear to be a bug that the team has zeroed in on and will work to address in a future release.

If you have any other questions or concerns don’t hesitate to reach back out. We are always happy to help!

1 Like