Link to home
Start Free TrialLog in
Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on

Moving a Site to another host

I have been working with a hosting company that I trust completely; they have always done everything perfectly & have NEVER let me down or not been responsive.

Today, however, I am having them move a WordPress site for me & I am unable to test it on their server before I change the DNS.

My environment is Windows 7. They told me I could test it by adding an entry to a file called hosts located at C:\Windows\System32\drivers\etc\hosts. I went there and added an entry to the existing file that was <ip address www.sitename.com> where ip address is the NEW ip address at the new host.

They said then open it in a browser, I did, it reverts back to the old (current) host.

My question is, I have never heard of this file "hosts" before. I'm guessing that having an entry there is supposed to make the browser go to the specified IP address for that domain name if it finds it in that file.

In FireFox it just stays with the old. In chrome, it gives a 404 error.

Is this technique supposed to work?
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Virtually all Windows, Linux, Unix, BSD, and OSX computers have a 'hosts' file since 1984.  It is used to associate IP addresses with names.  You may have to reboot your computer for it to take effect.  And some anti-virus applications make it difficult for you to edit your 'hosts' file because that has been one of the ways that viruses and malware have hikacked legitimate web sites like Google and Microsoft.

http://en.wikipedia.org/wiki/Hosts_%28file%29
SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of skss228
skss228

Make sure you are not passing through any proxy (make sure you have no proxy set on your browser) as the proxy will bypass the local host file entry.

Alternative!! create a test DNS A/CNAME record pointing to your new environment (ex. test.sitename.com) so that you can run a test on your new site performance as well and clear any blocker before switching the Live site.

As you said it is a wordpress site, so you can add new test (test.sitename.com) url to your configuration using wordpress admin console for testing.
Avatar of Richard Korts

ASKER

It's now working, not sure why.

The host had me enter the IP TWICE, once with www.sitename.com and once with JUST sitename.com.

I have other issues; see next question.