i have the same problem with the host file. it doesnt update and it show to me a the message error.
i make the steps that some of you reccomend in other posts but still it doesnt work.
what can i do??
Hi @kikoeris
What version of Windows are you on?
What is your Local version?
What steps have you tried so far?
i have the local version 9.0.3
windows 10 pro
and i try the steps which said to uncheck the read only in the host file properties
Do you have any other security or firewall applications?
Do you have any other developer applications?
Is this is a work issued machine?
Are you an admin user?
no i dont have other security or applications
neither developer applications.
yes i am admin user. it is my personal pc
Is this your first time using Local or was it working previously and stopped?
Have you done a full reboot since adjusting the Hosts File settings? If not go ahead and try that next.
yes it is first time. actually i start studies for wordpress and i cant continue them without fix it. ok i will do that and i will come back.thank you
If the reboot doesn’t work I would try doing a full uninstall with our steps here:
Then reinstall the latest release from here making sure the Hosts File is still editable.
the reboot doesnt work.i have unistall it and now i am download it again.i will be back to inform you later
still it doesnt work. now it doesnt show me the error message but when i click wp admin the site doesnt open
This error still indicates that Local might be having trouble updating the Hosts File. Can you verify this is still writeable for Local?
Can you try changing the Router Mode to Localhost and see if that works?
Preferences>Advanced>Router Mode
Yes it is writeable i check it. I also change the router mode but nothing works
To double check here, can you open a command prompt with administrator privileges and navigate to the directory containing the hosts file (probably C:\Windows\System32\drivers\etc
). Once there run this command and see what the output is:
attrib C:\Windows\System32\drivers\etc\hosts
If it’s still showing “Read Only” then you can try running this:
attrib -r C:\Windows\System32\drivers\etc\hosts
Additionally, if User Account Control (UAC) is enabled, it might restrict write access to system files. You can temporarily lower the UAC settings by:
- Open the Control Panel.
- Go to “User Accounts” > “Change User Account Control settings”.
- Lower the slider to a lower setting, such as “Never notify”.
- Restart your computer and try again
well i dont have the uac enable. i check it.
when i go to command prompt and try to change the path it show me this
So it doesn’t look like the hosts file is at the usual location, which means it’s possible that it may have been moved or modified by another application, or there may be some unique system configuration with your setup. Here’s another method to locate it:
- Open File Explorer.
- Navigate to the "C:" drive.
- Use the search bar in the top-right corner to search for “hosts”.
- Make sure to check “Hidden items” in the View tab of File Explorer, as the hosts file is sometimes set as hidden.
If you still can’t locate it, there might be some system-level configuration or software interference which might explain the issues you’ve been having here but would be tough for us to advise on.
Do you have another machine you could use or test with?
It’s normal to have some Hosts file backups show up but it’s curious to me that those two in your screenshot are from 2015 and 2022.
If you go back to command prompt, did you try just running this?
C:\Windows\System32\drivers\etc
It looks like from your screenshot you tried running some other variations like
C:\Windows\System32\drivers\etc\hosts
or C:\Windows\System32\drivers\
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.