# 502 Bad Gateway - nginx/1.26.1 Mac

**URL:** <https://community.localwp.com/t/502-bad-gateway-nginx-1-26-1-mac/45007>\
**Category:** Support\
**Tags:** 502-request-error, mac\
**Created:** [October 14, 2024, 7:45am UTC](https://community.localwp.com/t/502-bad-gateway-nginx-1-26-1-mac/45007 "2024-10-14T07:45:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cathy](https://avatars.discourse-cdn.com/v4/letter/c/9de0a6/32.png) [@Cathy](https://community.localwp.com/u/Cathy)\
**Post date:** [October 14, 2024, 7:45am UTC](https://community.localwp.com/t/502-bad-gateway-nginx-1-26-1-mac/45007/1 "2024-10-14T07:45:58Z")

</div>

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](https://community.localwp.com/uploads/short-url/q7RYyMRY2fddhh4fHz6lvQ7Ltpn.log) (473.8 KB)  
[local-lightning.log](https://community.localwp.com/uploads/short-url/oCqV7NISUSbjgvUW9itGllwTd4V.log) (73.6 KB)

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [October 14, 2024, 12:56pm UTC](https://community.localwp.com/t/502-bad-gateway-nginx-1-26-1-mac/45007/2 "2024-10-14T12:56:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Cathy](https://avatars.discourse-cdn.com/v4/letter/c/9de0a6/32.png) [@Cathy](https://community.localwp.com/u/Cathy)\
**Post date:** [October 14, 2024, 2:06pm UTC](https://community.localwp.com/t/502-bad-gateway-nginx-1-26-1-mac/45007/3 "2024-10-14T14:06:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [October 14, 2024, 2:09pm UTC](https://community.localwp.com/t/502-bad-gateway-nginx-1-26-1-mac/45007/4 "2024-10-14T14:09:22Z")

</div>

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](https://localwp.com/help-docs/getting-started/how-to-import-a-wordpress-site-into-local/#restore-local-site-from-site-files)

---

<div class="post-metadata">

**Author:** ![Cathy](https://avatars.discourse-cdn.com/v4/letter/c/9de0a6/32.png) [@Cathy](https://community.localwp.com/u/Cathy)\
**Post date:** [October 15, 2024, 7:43am UTC](https://community.localwp.com/t/502-bad-gateway-nginx-1-26-1-mac/45007/5 "2024-10-15T07:43:07Z")

</div>

Thanks Nick

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

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [October 15, 2024, 1:38pm UTC](https://community.localwp.com/t/502-bad-gateway-nginx-1-26-1-mac/45007/6 "2024-10-15T13:38:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![matthewskeith](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/matthewskeith/32/23479_2.png) [@matthewskeith](https://community.localwp.com/u/matthewskeith)\
**Post date:** [December 30, 2024, 7:54pm UTC](https://community.localwp.com/t/502-bad-gateway-nginx-1-26-1-mac/45007/7 "2024-12-30T19:54:52Z")

</div>

I was running into the same issue. I was pulling a site down from Flywheel in order to test for SQL 8.0 compatibility. I got the site up and running, but couldn’t get into the admin. It was a plugin issue. I disabled all plugins and got into the admin. Then I started enabling plugins one at a time to time and find the culprit. It is AIOSEO. It appears that AIOSEO is compatible with SQL 8.0, according to their support documentation, but it breaks my Local site install. Really not sure what is causing the issue, but I’m hopeful that everything will work well when it updates live here in a few weeks.

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [December 30, 2024, 8:47pm UTC](https://community.localwp.com/t/502-bad-gateway-nginx-1-26-1-mac/45007/8 "2024-12-30T20:47:27Z")

</div>

Thank you for sharing @matthewskeith!

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [March 30, 2025, 8:48pm UTC](https://community.localwp.com/t/502-bad-gateway-nginx-1-26-1-mac/45007/9 "2025-03-30T20:48:18Z")

</div>

Closed on March 30, 2025, 8:48pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
