I had a local site working OK (practice-site-2.local), and I changed in the database (via ADMINER) the site URL under wp_options table:
so changed “siteurl” and “home” values to the new values: practice-site-3.local
then I revered and changed it back to the previously working url - practice-site-2.local.
but for some reason, Local > View Site fails to show the site (practice-site-2.local) and shows a connection error pointing to the false name of practice-site-3.local:
This site can’t be reached
practice-site-2.local’s server IP address could not be found
I checked in wp_options (the database) as well as in WordPress > Settings > General and they all point to practice-site-2.local ?
Where Local gets the wrong practice-site-3.local URL please?
I don’t know why you think that would be a good practice. It’s not only the siteurl in the database where any installation of WordPress (not just on Local) will find its files, there are many instances of the initially set url in your database, so I’m really not surprised your site is not working anymore.
When you create a new website, Local adds an entry into the so-called ‘hosts’ file. That’s not changed when you are fiddling around with your database or settings in WordPress admin. If that hosts file entry doesn’t match, of course your site cannot be found.
But again: if you’re fiddling around with your database and WordPress site settings, don’t be surprised this causes errors.
Don’t do these things, or if you really feel the need for whatever reason, first clone the website.
In short: this ‘error’ has nothing to do with Local, only with you not understanding how things work in a WordPress install, ANY WordPress install.
Thank you for your answer, even though its a harsh answer - and a not very nice one
I managed to solve the issue by going to Chrome > Settings > Clear Browsing data. all works
Best wishes all,