Hello,
Wish to bring a probably less usual case to your attention.
When localwp starts, it inserts in the hosts file the domain names being used in the local sites. When localwp stops, it isn’t deleting them though. That’s a problem when local domain names are the same as live domains. I understand that’s usually not recommended, but an useful use case for this is testing WP sites with premium plugins that require domain-based licensing to work properly.
Would suggest localwp to delete the hosts entries when stopped, and to insert them back when started (and to flush dns implicitly). That way, one could browse and test local and live sites with the same domains w/o further issue.
Currently, I workaround this by using a small utility named “Hosts Manager” that allows swapping hosts files manually. But it becomes unnecessarily messy, especially if I forgot swapping the hosts file before stopping localwp.
Thanks for your consideration.
Thank you for the feature request and detailed workflow @alx359!
1 Like