Persistent Hosts File Access Issue in LocalWP on Windows 11

Hello,

I have a persistent issue with Local on Windows 11 regarding the modification of the hosts file. I know there are already many posts on this topic, but no matter what I do, I can’t solve the problem.
The error message is: “Local is requesting administrative privileges to modify your hosts file…”
I attached the .log file

Steps:
I have granted full control to the hosts file for all users.
Temporarily disabled my antivirus (Bitdefender).
Reinstalled Local multiple times, restarted computer.
I run LocalWP with administrative privileges.

System Details

  • Local Version: 10.0.22631 Build 22631

  • Operating System (OS) and OS version: Microsoft Windows 11 Pro


Local Logs

Attach your Local Logs here ([Help Doc - Retrieving Local’s Log](
local-details.json (926 Bytes)
local-lightning-verbose0.log (135.8 KB)
/))


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.

Hi @Maxianna20

Is the issue that the message keeps popping up or that it’s not allowing you to proceed with working on any of your sites or make changes?

Hi,

It basically doesn’t let me do anything, as my site is unreachable.

Is the machine you’re using a personal machine? Or issued by a company/employer?

You’re certain you don’t have any other antivirus, security, or firewall applications running?

Are you running other developer applications simultaneously? Apps like MAMP, XAMPP, or Docker for example.

Could you share some screenshots of the pop up and your hosts file settings?

It is my home computer and I don’t have other antivirus, or firewall applications running.
My hosts file has full control for all users and apps. The screenshots shows the error pop-ups and hosts settings.
Screenshot 2024-09-19 170254
Screenshot 2024-09-19 170119
Screenshot 2024-09-19 170103
Screenshot 2024-09-19 170025

Hi @Maxianna20

When you get this pop up:

imagey

Do you click on it and allow the changes? Once you click on it you should get another pop up like this:

Yes, I already clicked for a few times, but nothing appears.

Can you click on the three dots ... in that first prompt and see if notifications for Local are disabled or go into your Notification settings and check those?

The notifications are on. But when I click on that Host Redirection popup, no Windows Command Processor popup shows.

1 Like

If you click on Fix It does that bring the pop up back?

If you click on the 3 dots and go into your Notification settings can you find anything in there that might be disabled?

Essentially that second pop up, and clicking Yes is what is missing here. I’m not sure why it’s not showing up on your machine as I’m testing it on my Windows machine but I can’t replicate it or find any other specific setting that might be blocking it here.

1 Like

I’v got the exact same problem. Same config but (Version 9.0.5+6706) and same problem. :frowning:

Hi @Tokio

Have you checked your notification settings or tried clicking on Fix It? In my screenshots above that second prompt should be showing up so you can allow access, if it’s not then something might be blocking it.

You could start here for some other items to check:

I’m in the same situation : no second prompt… :frowning:

What about these items @Tokio ?

Sorry but none of these won’t awnser solved my problem… I’m switching to Laragon. Screen shot was the same as this post so that why I shwoed up.

Thanks for your help Nick-B. You’re awsome trying to help everyone !

1 Like

Thank you for your patience with us @Tokio and for giving Local a spin!

@Maxianna20 @Tokio and any other future users who reach this thread. One of the Local devs shared this with me today from a past post as a potential solution for the permission to make changes prompt not appearing in Windows:

Stil the same issue on my side… :frowning: I put the path they told us… but won’t help.

Thanks for trying, @tokio. No rush but if you don’t mind you could try manually pulling your Local Log and sharing that with us? Some instructions here on how to do that for Windows.