# I'm getting a 502 error on my site

**URL:** <https://community.localwp.com/t/im-getting-a-502-error-on-my-site/34831>\
**Category:** Support\
**Tags:** hosts-file, windows, windows-10\
**Created:** [December 21, 2022, 4:00pm UTC](https://community.localwp.com/t/im-getting-a-502-error-on-my-site/34831 "2022-12-21T16:00:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![scarecrow202](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/scarecrow202/32/17346_2.png) [@scarecrow202](https://community.localwp.com/u/scarecrow202)\
**Post date:** [December 21, 2022, 4:00pm UTC](https://community.localwp.com/t/im-getting-a-502-error-on-my-site/34831/1 "2022-12-21T16:00:06Z")

</div>

![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/b/e/be6efd7267f70f642e0c0230a2a5ad2a8dbeee8e.png)  
I recently worked on a Divi and closed it only to say I had a local host problem with my site. The next move I made was to uninstall Local to re-install it on another hard drive. After I did that, I got a 502 error. How do i fix this so I won’t lose the work? Also, I keep having issues with creating a new site. The hard drive that I’m using has 700 gigs. I don’t understand why I am limited with this.  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/e/6/e6d668cc2982dd6afc35bb4d47d5ce0071a2716f.png)

Also, here is the database files ,

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/9/f/9fd09dceaf0d33fb443a3ce1d9a9bdbf98270073.png)

---

<div class="post-metadata">

**Author:** ![sambrockway](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/sambrockway/32/18726_2.png) [@sambrockway](https://community.localwp.com/u/sambrockway)\
**Post date:** [December 21, 2022, 5:31pm UTC](https://community.localwp.com/t/im-getting-a-502-error-on-my-site/34831/2 "2022-12-21T17:31:12Z")

</div>

Hello @scarecrow202 - welcome to the Local community. 👋

Have you made an export of the Local site? That way you have a backup of your work.

Here’s how to do that:

[https://localwp.com/help-docs/getting-started/how-to-export-a-wordpress-site-on-local/](https://localwp.com/help-docs/getting-started/how-to-export-a-wordpress-site-on-local/)

If you do that, are you able to re-import that exported version in your new Local?

I would also recommend checking out this forum thread - I’m wondering if somewhere along the way the site URL was updated (either in the WordPress settings or within Local?)

> [@This site WordPress URL settings do not match host set in local](http://community.localwp.com/t/this-site-wordpress-url-settings-do-not-match-host-set-in-local/24450/3):
>
> Hi Ben, Thank you but I am still struggling because I don’t know what the original URL setting was. And because I was so bright to fiddle with the settings. I can get access to the site. I am new at this and believe me I dropped what I found and it declines the files. I searched high and low in all files hoping to find the original URL settings but I can’t find it. Regards, Adele

Let me know if either of these gets things working again,

Sam

---

<div class="post-metadata">

**Author:** ![scarecrow202](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/scarecrow202/32/17346_2.png) [@scarecrow202](https://community.localwp.com/u/scarecrow202)\
**Post date:** [December 21, 2022, 5:53pm UTC](https://community.localwp.com/t/im-getting-a-502-error-on-my-site/34831/3 "2022-12-21T17:53:21Z")

</div>

I have it, but I have noticed it’s for all my sites. I didn’t do a backup when I did a backup and tried to re-upload it.

All of my sites are saying this. It’s funny; I was working on my site last night.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/c/5/c5838177ecc31730068c9fd7de4c4b9acbd1b4e9.png)  
This is the second or third time I have had this issue, plus alot of viruses from local.

---

<div class="post-metadata">

**Author:** ![scarecrow202](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/scarecrow202/32/17346_2.png) [@scarecrow202](https://community.localwp.com/u/scarecrow202)\
**Post date:** [December 21, 2022, 6:00pm UTC](https://community.localwp.com/t/im-getting-a-502-error-on-my-site/34831/4 "2022-12-21T18:00:58Z")

</div>

![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/1/8/1846146555023ef1f73ab9b3329513c6a96410ae.png)  
This is what I’m getting from the shell.

---

<div class="post-metadata">

**Author:** ![scarecrow202](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/scarecrow202/32/17346_2.png) [@scarecrow202](https://community.localwp.com/u/scarecrow202)\
**Post date:** [December 21, 2022, 6:17pm UTC](https://community.localwp.com/t/im-getting-a-502-error-on-my-site/34831/5 "2022-12-21T18:17:13Z")

</div>

This is what I get when I try back it up again!  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/e/e/ee73ae4580f9d9272079380f96eeab7014a4db7f.png)

---

<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 22, 2022, 8:48pm UTC](https://community.localwp.com/t/im-getting-a-502-error-on-my-site/34831/6 "2022-12-22T20:48:21Z")

</div>

Hi @scarecrow202 Could you share a copy of your Local Logs? There are some different ways to access and share Local Logs. For us to be able to troubleshoot thoroughly, please click the `Download Local Logs` button from the `Support` tab in Local. This will generate a zip archive that contains the Local log along with some other diagnostic information to help quickly zero in on any issues that Local is encountering.

---

<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 22, 2023, 8:48pm UTC](https://community.localwp.com/t/im-getting-a-502-error-on-my-site/34831/7 "2023-03-22T20:48:46Z")

</div>

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