# Local has overwritten my entire hosts file - Windows 10, Local 6.7.0

**URL:** <https://community.localwp.com/t/local-has-overwritten-my-entire-hosts-file-windows-10-local-6-7-0/36016>\
**Category:** Support\
**Tags:** hosts-file, windows-10\
**Created:** [March 17, 2023, 2:13pm UTC](https://community.localwp.com/t/local-has-overwritten-my-entire-hosts-file-windows-10-local-6-7-0/36016 "2023-03-17T14:13:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![swaip](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@swaip](https://community.localwp.com/u/swaip)\
**Post date:** [March 17, 2023, 2:13pm UTC](https://community.localwp.com/t/local-has-overwritten-my-entire-hosts-file-windows-10-local-6-7-0/36016/1 "2023-03-17T14:13:58Z")

</div>

# Bug Summary

Don’t know exactly when/how, Local has entirely overwritten my hosts file, so that the only entries left are those between

## Local - Start

and

## Local - End

# Steps to reproduce

Most probably when Local failed to import a site and the entire list of sites disappeared.

# Environment Info

- What Operating System are you using? Windows 10
- What versions of site software (Nginx, Apache, PHP, MySQL) is used? N/A
- What version of Local is installed? 6.7.0

---

<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:** [March 17, 2023, 3:40pm UTC](https://community.localwp.com/t/local-has-overwritten-my-entire-hosts-file-windows-10-local-6-7-0/36016/2 "2023-03-17T15:40:32Z")

</div>

Hi @swaip

So you were trying to import a site, that failed and then all of your other sites in your Local app disappeared? Are you still able to local the site files on your machines somewhere?

Could you share your Local Log with us? [Retrieving Local’s Log File](https://localwp.com/help-docs/troubleshooting/retrieving-locals-log-file/#download-local-logs)

---

<div class="post-metadata">

**Author:** ![swaip](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@swaip](https://community.localwp.com/u/swaip)\
**Post date:** [March 17, 2023, 4:20pm UTC](https://community.localwp.com/t/local-has-overwritten-my-entire-hosts-file-windows-10-local-6-7-0/36016/3 "2023-03-17T16:20:18Z")

</div>

Hi Nick-B, thanks for answering.  
Actually no, I SUPPOSE overwriting of the hosts file happened when I tried to import a site.  
What I’m sure of, is that the import deleted the LIST of local sites (“You haven’t created any site yet” when I restarted Local), but NOT the actual folders of the sites. I then re-imported them one by one.

---

<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:** [March 17, 2023, 9:20pm UTC](https://community.localwp.com/t/local-has-overwritten-my-entire-hosts-file-windows-10-local-6-7-0/36016/4 "2023-03-17T21:20:00Z")

</div>

Hi @swaip I’m glad you were able to find and retrieve the sites to re-import them.

Would you mind sharing a copy of your Local Log? [Retrieving Local’s Log File](https://localwp.com/help-docs/troubleshooting/retrieving-locals-log-file/#download-local-logs)

Also, do you know if you have any security, firewall or anti-virus applications running?

---

<div class="post-metadata">

**Author:** ![swaip](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@swaip](https://community.localwp.com/u/swaip)\
**Post date:** [March 17, 2023, 9:48pm UTC](https://community.localwp.com/t/local-has-overwritten-my-entire-hosts-file-windows-10-local-6-7-0/36016/5 "2023-03-17T21:48:00Z")

</div>

Here it is !  
I have Avira Free Security.

Thanks for your help !

[local-logs.zip](https://community.localwp.com/uploads/short-url/73xh5RpnWuwrpcNrwNBEvWR3dbe.zip) (124 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:** [March 18, 2023, 2:42pm UTC](https://community.localwp.com/t/local-has-overwritten-my-entire-hosts-file-windows-10-local-6-7-0/36016/6 "2023-03-18T14:42:29Z")

</div>

Hi @swaip

I’m seeing a lot of connection or update-type errors in the logs indicating that the machine may have been blocking or limiting Local. Usually, this comes from things like security applications so Avira could have played a part. Local does make changes to the host file but wiping out your previous sites is a new one for me unless something caused the files to get shifted like an update of some sort.

In the Local Log there are errors mentioning things like `getaddrinfo ENOTFOUND` and `could not update hosts` and the last couple of errors in the Router Log look like this:

```auto
2023/03/17 14:36:32 [error] 5200#1840: *96 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: ::1, server: energy-savings.local, request: "GET /wp-content/plugins/wp-mail-smtp/assets/images/reports/icon-note.png HTTP/1.1", upstream: "http://127.0.0.1:10005/wp-content/plugins/wp-mail-smtp/assets/images/reports/icon-note.png", host: "energy-savings.local"

```

```auto
2023/03/17 18:16:06 [crit] 24584#22144: *11 SSL_write() failed (10053: An established connection was aborted by the software in your host machine) while sending to client, client: 127.0.0.1, server: jam.local, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:10023/", host: "jam.local", referrer: "https://jam.local/"

```

We have some more details about troubleshooting security or port conflicts here that might be helpful: [Router Mode](https://localwp.com/help-docs/advanced/router-mode/)

I also just noticed multiple errors like this in the logs as well:

```auto
{"stack":"Error: ENOSPC: no space left on device, write","level":"warn","message":"Unable to import site.","timestamp":"2023-03-17T09:40:05.857Z"}

```

Is it possible your machine ran out of room? It may have aborted the import and then had a crash of some sort.

---

<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 16, 2025, 2:14pm UTC](https://community.localwp.com/t/local-has-overwritten-my-entire-hosts-file-windows-10-local-6-7-0/36016/7 "2025-03-16T14:14:36Z")

</div>

Closed on March 16, 2025, 2:14pm UTC

This topic was automatically closed after 730 days. New replies are no longer allowed.
