# Uh-oh! Could not update hosts file Local ran into a problem when trying to update the hosts file. Please ensure that the hosts file is not locked by anti-viruss

**URL:** <https://community.localwp.com/t/uh-oh-could-not-update-hosts-file-local-ran-into-a-problem-when-trying-to-update-the-hosts-file-please-ensure-that-the-hosts-file-is-not-locked-by-anti-viruss/42943>\
**Category:** Support\
**Created:** [May 18, 2024, 3:37pm UTC](https://community.localwp.com/t/uh-oh-could-not-update-hosts-file-local-ran-into-a-problem-when-trying-to-update-the-hosts-file-please-ensure-that-the-hosts-file-is-not-locked-by-anti-viruss/42943 "2024-05-18T15:37:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![graceleese](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@graceleese](https://community.localwp.com/u/graceleese)\
**Post date:** [May 18, 2024, 3:37pm UTC](https://community.localwp.com/t/uh-oh-could-not-update-hosts-file-local-ran-into-a-problem-when-trying-to-update-the-hosts-file-please-ensure-that-the-hosts-file-is-not-locked-by-anti-viruss/42943/1 "2024-05-18T15:37:27Z")

</div>

### What issue or error are you experiencing?

i keep running into this error " Uh-oh! Could not update hosts file

Local ran into a problem when trying to update the hosts file.

Please ensure that the hosts file is not locked by anti-virus."

* * *

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

i have read similar articles with the same issue

1. i’m not running other developer applications simultaneously eg XAMPP, or Docker. Neither have i downloaded any of these applications
2. i did not install or activate any antivirus, security, or firewall applications
3. i just downloaded local yesterday so i’m pretty sure its up to date and of the latest version

* * *

### System Details

- **Local Version:**

- **Operating System (OS) and OS version:**  
Operating system mac m3 chip

* * *

### Local Logs

Attach your Local Logs here ([Help Doc - Retrieving Local’s Log](https://localwp.com/help-docs/troubleshooting/retrieving-locals-log-file/))

* * *

_ **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.

---

<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:** [May 18, 2024, 3:46pm UTC](https://community.localwp.com/t/uh-oh-could-not-update-hosts-file-local-ran-into-a-problem-when-trying-to-update-the-hosts-file-please-ensure-that-the-hosts-file-is-not-locked-by-anti-viruss/42943/2 "2024-05-18T15:46:53Z")

</div>

Hi @graceleese

Is this a work machine perhaps? Sometimes if a piece of equipment is issue by your employer it will come with certain apps or programs that might restrict access.

Could you share your full local log with us as well? 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:** ![abdnafees](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/abdnafees/32/21808_2.png) [@abdnafees](https://community.localwp.com/u/abdnafees)\
**Post date:** [May 19, 2024, 7:15am UTC](https://community.localwp.com/t/uh-oh-could-not-update-hosts-file-local-ran-into-a-problem-when-trying-to-update-the-hosts-file-please-ensure-that-the-hosts-file-is-not-locked-by-anti-viruss/42943/3 "2024-05-19T07:15:13Z")

</div>

I am on a MacBook Pro M1 Pro and experiencing the same issue. It’s a fresh OS but still keep getting this 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:** [May 24, 2024, 5:25pm UTC](https://community.localwp.com/t/uh-oh-could-not-update-hosts-file-local-ran-into-a-problem-when-trying-to-update-the-hosts-file-please-ensure-that-the-hosts-file-is-not-locked-by-anti-viruss/42943/4 "2024-05-24T17:25:59Z")

</div>

Hi @abdnafees

Have you checked for all of the above-mentioned culprits? Do you have any antivirus, security, or firewall applications that could be blocking Local? Are you running other developer applications simultaneously? Is this a machine issue by your employer?

---

<div class="post-metadata">

**Author:** ![abdnafees](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/abdnafees/32/21808_2.png) [@abdnafees](https://community.localwp.com/u/abdnafees)\
**Post date:** [May 24, 2024, 6:17pm UTC](https://community.localwp.com/t/uh-oh-could-not-update-hosts-file-local-ran-into-a-problem-when-trying-to-update-the-hosts-file-please-ensure-that-the-hosts-file-is-not-locked-by-anti-viruss/42943/5 "2024-05-24T18:17:29Z")

</div>

I don’t know how I solved it but my setup works now. 🙂

---

<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:** [May 24, 2024, 6:21pm UTC](https://community.localwp.com/t/uh-oh-could-not-update-hosts-file-local-ran-into-a-problem-when-trying-to-update-the-hosts-file-please-ensure-that-the-hosts-file-is-not-locked-by-anti-viruss/42943/6 "2024-05-24T18:21:19Z")

</div>

Glad to hear it @abdnafees! Thank you for updating us 💚

---

<div class="post-metadata">

**Author:** ![VirtualCitizen](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/virtualcitizen/32/17381_2.png) [@VirtualCitizen](https://community.localwp.com/u/VirtualCitizen)\
**Post date:** [July 26, 2024, 4:56am UTC](https://community.localwp.com/t/uh-oh-could-not-update-hosts-file-local-ran-into-a-problem-when-trying-to-update-the-hosts-file-please-ensure-that-the-hosts-file-is-not-locked-by-anti-viruss/42943/7 "2024-07-26T04:56:57Z")

</div>

I had the same issue on my Windows 10 computer and had to temporarily Pause my antivirus to be able to launch WordPress in LocalWP.

---

<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:** [October 24, 2024, 4:57am UTC](https://community.localwp.com/t/uh-oh-could-not-update-hosts-file-local-ran-into-a-problem-when-trying-to-update-the-hosts-file-please-ensure-that-the-hosts-file-is-not-locked-by-anti-viruss/42943/8 "2024-10-24T04:57:36Z")

</div>

Closed on October 24, 2024, 4:57am UTC

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