I have WordPress theme developed on localhost (WAMP). Couple hours ago I have set live VPS server with the fresh installation of WordPress and new database. Everything worked fine with that.
So, I tried to move all files and database to live server but couldn't connect it with localhost database. I have changed all necessary details in wp_config.php and wp_options table and so on, but site responded with the error connecting to the database. So I switched back to the first database on the live server and everything worked great. I deleted the database from server and theme files so I have only left with plain WordPpress installation.
But now when I enter localhost in the address bar, it keeps opening my live domain but also giving the error about DNS records not found. Only when I refresh browser domain, it becomes live and working normally. But I don't want that. It supposed to open the site on localhost. All database tables on localhost pointing to localhost, not to live server or domain. I don't understand why is this happening.