Disable host file locking error

Issue Summary

I always get this error trying to install localwp.
Screenshot_5

Troubleshooting Questions

  • This is my first wordpress installation

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    No, I can’t.

Replication

I have no firewall neither antivirus activated but windows defender.

System Details

  • Localwp version is 5.8.1

  • Operating System is Windows 10 - family version

  • Local Log :
    local-lightning.log (9.6 KB)

Hey @wissiyou – Welcome to the Local Community Forums!

It’s possible that there’s still a setting in Windows Defender that is trying to scan the Hosts file.

You might take a look at this help doc from Microsoft and see if you can exclude the Hosts file from being scanned:

https://support.microsoft.com/en-us/help/2764944/hosts-file-is-detected-as-malware-in-windows-defender

thanks a lot ben
unfortunately I cannot even add the hosts file as windows defender only taks .exe .com and .icd
I’ve tried to make windows defender inactive but it still doesn’t work.
That’s complete craziness and I don’t understand how this is so complicated to find a solution for me.
I’ve already tried with laragon and xamp without finding a solution.
If you have any other idea that would be very welcome. thanks

Maybe it isn’t Windows Defender?

The general issues is that Local is trying to update the hosts file and can’t because something is accessing or locking that file.

Maybe you can search for the hosts file within the process list? This StackOverflow answer outlines the general steps to take:

From there, you might be able zero in on what’s preventing the Hosts file from being updated.

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