Win 10 - Uh-oh! Could not update hosts file

Win 10 - Uh-oh! Could not update hosts file
Win 10 - Uh-oh! Could not update hosts file

  1. I have ensured the host file is not locked
  2. Turned off win10 antivirus

PS. Gone through similar topics, but no help.

Any help resolving this issue will be deeply appreciated.

Thanks

Hi there @Johngoe -

I know you mentioned looking through other topics, I want to make sure - did you see this one?

Here is some information and troubleshooting steps you can try related to anti-virus + Windows:

Let’s start there!

Sam

Hi Sam

Firstly, allow me to express my deep appreciation for your interest in helping me resolve this conundrum.

Yes, I have unchecked “Read-only” in the hosts file. This unfortunately did not resolve the situation.

By the way, I use standard win10 security, nothing else. And as mentioned before, I have tried disconnecting win10 security to see if that will resolve the situation, but unfortunately, that did not help.

I look forward to more suggestions that might help resolve the situation.

Thank you.

Hi @Johngoe!

Could you share your Local Log with us so we could take a deeper look? There are some different ways to access and share Local Logs. For us to be able to troubleshoot thoroughly, please click the Download Local Logs button from the Support tab in Local. This will generate a zip archive that contains the Local log along with some other diagnostic information to help quickly zero in on any issues that Local is encountering.

As requested, please find an attached Local log file
local-logs.zip (54.6 KB)

Hi @Johngoe The logs still look like something is blocking Local. There are some steps here that you might try (specifically 2 and 3), otherwise you may want to attempt a more aggressive reset with these steps below:

  • Export any sites that you have on Local and save them to a folder somewhere on your computer.

  • Fully uninstall Local from your computer.

  • Install the latest version of Local on this link.

  • Once installed, please restart the computer.

  • When the computer is restarted and turned on, close any applications that automatically run in the background (AntiVirus, Firewall, and other Developer applications included).

  • Check and see if the issue still persists. If so, please provide us with an updated log.

Keep us posted and we’d be happy to help further!

Unfortunately, the issue still persists. Please find the attached log below -
local-logs.zip (57.2 KB)

Upon trying to open the website and subsequently failing to do so, the Tab states; “Server not found”.

@Nick-B Hello, I have the same issue , I tried all the methods from above, changing the router mode, uninstall completely and reinstalling and some other ones and also I don’t have problem with my firewall or antivirus [ I’m using windows 11 virus guard only ] . These 2 will pop up and at the end I can’t create the website after the second one.
error 2

what can I do?

A temporary solution –
To create a new website,

  1. Go to top-left hamburger menu icon, and open.
  2. Choose “Preferences”.
  3. Under “Preferences” choose “Advanced”
  4. Under “Advanced” go to “Router mode” and select “localhost”
  5. Then choose “Apply” in the bottom right corner to save your selection
  6. Go to top-right corner and close this window.
  7. Now go to top-left hamburger menu icon, and choose “Add new site”
  8. Then under “Create a new site” select “Continue”
  9. Choose and write a site name and select “Continue”
  10. Under “Preferred” select “Continue”
  11. Now write your “WordPress username”, “WordPress password” and “WordPress e-mail”.
  12. The local Flywheel website should now be created.
  13. If so, select “WP Admin” and enter your Username or Email Address and Password
  14. A new Wordpress website will now be opened.

P.S. If your website was however once already generated under “Site domains” under “Router mode”
Then do the following –
15. Go to top-left hamburger menu icon, and open.
16. Choose “Preferences”.
17. Under “Preferences” choose “Advanced”
18. Under “Advanced” go to “Router mode” and select “Site domains”
19. Then choose “Apply” in the bottom right corner to save your selection
20. Go to top-right corner and close this window.
21. Now choose the “Router mode/Site domains” website under “Local sites” and select “WP Admin”
22. You might get one or two windows: Host Redirection and/or Uh.oh! Could not update hosts file. Ignore these by pressing Ok.
23. Your website will now be opened, unless you need to re-enter your Username or Email Address and Password.

P.S. If your website was however once already generated under “localhost” under “Router mode”, then repeat 15 – 23, and under point 18, and under “Advanced” go to “Router mode” then select “localhost”.

P.S. WP-Optimize is suggested as a competent plugin to help keep your website from crashing and efficient by keeping your WP database clean and stable.

2 Likes

Hello @Johngoe -

Thank you for providing this workaround.

I can bring this thread back to the Local engineering team to see if there’s any long term solution we can provide, but at this time I appreciate you for writing out how you got it all working.

Sam

Hello there…I am not an expert, just trying to do this for the first time. I am getting the same uh-oh could not u0ddate hosts file, I have been reading all of this…have zero virus protection on, have all permissions checked…no read only is checked…have uninstalled and started over…nothing is working. Latest error I tried to snip and paste and I can’t get that to show up either
error plus log attached…please help
image
local-logs.zip (6.3 KB)

Hi @tjrief

This error is unrelated to the above. More information here that should help you though!

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