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
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
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
@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
nslookup toolstiphub.local
I get:
pgsql
CopyEdit
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
- 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:
- Has anyone faced a similar issue with the
hosts
file being unmodifiable? - Is there a permanent fix or workaround?
- 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!