wordpresshosts-file

Can I edit the hosts file to see the new website and still access the old one?


I'm developing a new website that will have the same domain name as the current old one, but a different host. The new one doesn't have DNS nameservers pointed to it yet, but I edited the hosts file on my computer to be able to access it. Is there a way I can now still access the old current one on the same computer, since it would help me with development, without changing the hosts file everytime?

Thanks :)


Solution

  • You can check the old site by using the temporary URL

    http://server_ip/~cpanelusername/
    

    but many of host block ip preview. You also can use archive.org. You can save the old site before starting new.

    For this type scenario, I use a subdomain to built a new site.

     www.mysite.com >> www.dev.mysite.com