502 Bad Gateway - nginx/1.26.1 Mac

Hi there, I’ve read and tried so many forums and not getting to any solution. I’ve also switched to different PHP versions, the oldest 7.3.5 seems to open but then I have plugin errors since its so old. Can you please help me to resolve this issue?

What issue or error are you experiencing?

Starting my site gives a 503 Bad Gateway error.


System Details

  • **Local Version:Version 9.1.0+6719

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


Local Logs

local-lightning-verbose.log (473.8 KB)
local-lightning.log (73.6 KB)

Hi @Cathy

If you create a new, blank site and open it do you get an error? Or is this just happening with a specific site you’ve been working on?

Hi @Nick-B, if I create a blank site it seems to work as expected.
The error I get every time is for all the sites I pull from Flywheel, which is mainly what I use LocalWP for.

For one of the sites that is giving you trouble could you try reimporting it and see if that works? 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/your machine
  • Reimport the site back into Local. You can refer here on how to Restore from only Local site files

Thanks Nick

Unfortunately, that does not seem to work either. Same error.

It seems like the error might be site specific. Have you tried doing any troubleshooting by disabling plugins, swapping themes, etc?

You could use the Site Shell function to do this via CLI and run a command like wp plugin deactivate --all to start. If that gets you back in then you can turn plugins back on one at at time to see when the issue starts.

You could also use a tool like Query Monitor to monitor site load as well when you’re back in the backend.