Local can't create site under Windows due to hosts file

Thanks for the Local log and the additional screenshots.

The main error I’m seeing is this one related to Could not update hosts. Here’s the full error line:

{"thread":"main","class":"HostsFileService","error":{"code":101},"stdout":{},"stderr":{},"exitCode":101,"level":"error","message":"Could not update hosts.","timestamp":"2021-09-08T23:58:35.932Z"}

You’ll need to do one of two things in order to be able to create new sites:

  1. Figure out what’s locking down the hosts file and allow Local to be able to edit that file.
  2. Consider using the localhost Router Mode setting that’s found under “Preferences > Advanced > Router Mode.” Using this mode should allow you to create new sites, but it does mean that some features aren’t available for you to use. For more details on this feature, see this help doc: https://localwp.com/help-docs/advanced/router-mode/
1 Like