Should the hosts file be updated when site is turned off?

Completely new to this, so sorry if this is obvious…

When I turn off a site by clicking Stop Site, my expectation is that the entry in the hosts file to be commented out or removed, so that the domain name being used reverts back to the real interwebs. Is this not the case?

I can confirm that the hosts file is being written to, because I have changed the domain name and see the resulting change in the hosts file.

If this is not how Local works, can I suggest that it should, as it allows easy working on local dev sites whilst keeping the same domain name in the database, and keeping the live site accessible without having to edit the hosts file.


1 Like

Hi Peter,

Right now it only modifies the hosts file when a site is added/removed.

Some other users have expressed interest in this exact thing. Be sure to vote up Stoping site should remove from /etc/hosts :smiley:

I’m going to go ahead and close this for the sake of keeping discussion in the topic mentioned above.