# 🔧 Title: "Unable to Update Hosts File in Local – Tried Everything (Admin, Antivirus, Reinstall, Manual Edits)"

**URL:** <https://community.localwp.com/t/title-unable-to-update-hosts-file-in-local-tried-everything-admin-antivirus-reinstall-manual-edits/50230>\
**Category:** Support\
**Tags:** hosts-file, windows-10\
**Created:** [May 20, 2025, 10:16am UTC](https://community.localwp.com/t/title-unable-to-update-hosts-file-in-local-tried-everything-admin-antivirus-reinstall-manual-edits/50230 "2025-05-20T10:16:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Haseeb546](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/haseeb546/32/24299_2.png) [@Haseeb546](https://community.localwp.com/u/Haseeb546)\
**Post date:** [May 20, 2025, 10:16am UTC](https://community.localwp.com/t/title-unable-to-update-hosts-file-in-local-tried-everything-admin-antivirus-reinstall-manual-edits/50230/1 "2025-05-20T10:16:23Z")

</div>

Hi everyone,

I’m facing a persistent and frustrating issue with **Local by Flywheel (LocalWP)** on Windows. I’m trying to run a local WordPress site, but I keep encountering the following 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.

On the site overview in Local, I also get:

> ⚠ Warning! Missing hosts entry. This site may be inaccessible.

* * *

### 🔍 Here’s What I’ve Tried So Far:

#### ✅ Antivirus Settings

- I use **McAfee Antivirus**.
- Real-time scanning has been turned OFF.
- I have added the **`hosts` file** to the excluded list manually in McAfee.

#### ✅ Manually Edited Hosts File

- Opened `C:\Windows\System32\drivers\etc\hosts` in Notepad (as administrator).
- Tried adding:

lua

CopyEdit

```auto
127.0.0.1 toolstiphub.local

```

- However, Windows tries to save it as `hosts.txt`, and editing doesn’t reflect in Local.

#### ✅ Confirmed Hosts File Content

- My current `hosts` file contains this line (added manually):

lua

CopyEdit

```auto
127.0.0.1 toolstiphub.local

```

- The file also includes Tailscale entries (I use Tailscale on this system).

#### ✅ Ran a `.bat` File as Admin

- Created and executed a batch file to add the entry:

bat

CopyEdit

```auto
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
set "hostfile=%SystemRoot%\System32\drivers\etc\hosts"
echo 127.0.0.1 toolstiphub.local >> "!hostfile!"
pause

```

- It executed but did **not solve the issue**.

#### ✅ Checked with `nslookup`

- When running:

lua

CopyEdit

```auto
nslookup toolstiphub.local

```

I get:

pgsql

CopyEdit

```auto
DNS request timed out.
*** Request to UnKnown timed-out

```

#### ✅ Completely Uninstalled Local

- Uninstalled Local via Control Panel
- Deleted the following folders:
  - `%AppData%\Local`
  - `%AppData%\Roaming\Local`
  - `%LocalAppData%\Programs\Local`
  - `%UserProfile%\.local`

- Rebooted the system
- Downloaded the latest version from [https://localwp.com](https://localwp.com)
- Installed **as administrator**
- Launched Local as administrator

Still, **the issue persists**.

* * *

### ❓ What I Suspect:

- The `hosts` file might still be **locked by a background process** or some **Windows security feature**.
- Possibly a conflict with **Tailscale** DNS or network configs?
- Windows Defender Controlled Folder Access was also disabled — no help.

* * *

### 🆘 What I Need:

Please let me know:

1. Has anyone faced a similar issue with the `hosts` file being unmodifiable?
2. Is there a permanent fix or workaround?
3. Are there any hidden background processes or permissions that need to be reset?

Any help or advice from the community would be deeply appreciated! 🙏

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Haseeb546](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/haseeb546/32/24299_2.png) [@Haseeb546](https://community.localwp.com/u/Haseeb546)\
**Post date:** [May 20, 2025, 3:25pm UTC](https://community.localwp.com/t/title-unable-to-update-hosts-file-in-local-tried-everything-admin-antivirus-reinstall-manual-edits/50230/2 "2025-05-20T15:25:32Z")

</div>

I am waiting for the reply, so please reply to me ASAP so that I can proceed further with my task.

---

<div class="post-metadata">

**Author:** ![alesys](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/alesys/32/24309_2.png) [@alesys](https://community.localwp.com/u/alesys)\
**Post date:** [May 20, 2025, 7:30pm UTC](https://community.localwp.com/t/title-unable-to-update-hosts-file-in-local-tried-everything-admin-antivirus-reinstall-manual-edits/50230/3 "2025-05-20T19:30:40Z")

</div>

I have this same issue, along with the MySQL issue. I have done pretty much the same, with no results at all. In the meantime, I switched to develop on a Mac, which is not my main work environment and won’t work as a permanent solution.

---

<div class="post-metadata">

**Author:** ![alesys](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/alesys/32/24309_2.png) [@alesys](https://community.localwp.com/u/alesys)\
**Post date:** [May 21, 2025, 10:35pm UTC](https://community.localwp.com/t/title-unable-to-update-hosts-file-in-local-tried-everything-admin-antivirus-reinstall-manual-edits/50230/4 "2025-05-21T22:35:16Z")

</div>

After two weeks, I discovered a simple solution to my problem. I feel dumb for not thinking of this sooner. Just open IIS Manager, click on Default Website, and stop it. I hope this helps.

---

<div class="post-metadata">

**Author:** ![Haseeb546](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/haseeb546/32/24299_2.png) [@Haseeb546](https://community.localwp.com/u/Haseeb546)\
**Post date:** [May 22, 2025, 4:41am UTC](https://community.localwp.com/t/title-unable-to-update-hosts-file-in-local-tried-everything-admin-antivirus-reinstall-manual-edits/50230/5 "2025-05-22T04:41:23Z")

</div>

Can you please explain in detail how I can achieve this, as I am using it on Windows 11? Thank you.

---

<div class="post-metadata">

**Author:** ![alesys](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/alesys/32/24309_2.png) [@alesys](https://community.localwp.com/u/alesys)\
**Post date:** [May 22, 2025, 2:18pm UTC](https://community.localwp.com/t/title-unable-to-update-hosts-file-in-local-tried-everything-admin-antivirus-reinstall-manual-edits/50230/6 "2025-05-22T14:18:26Z")

</div>

Sure, hit the Windows key and look for Internet Information Services (IIS) Manager.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/3X/4/a/4a2bff312299e2731b24418ec800a1e1af543e8b.png)  
Expand the three options in the left column until you see a website, select it, then click Stop in the right column. After that, restart Local.

I hope this works for you. Good Luck!

---

<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:** [August 20, 2025, 2:18pm UTC](https://community.localwp.com/t/title-unable-to-update-hosts-file-in-local-tried-everything-admin-antivirus-reinstall-manual-edits/50230/7 "2025-08-20T14:18:39Z")

</div>

Closed on August 20, 2025, 2:18pm UTC

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