Forum Moderators: phranque

Message Too Old, No Replies

Moving from one hosting service to another

         

Hugene

11:36 pm on Dec 15, 2007 (gmt 0)

10+ Year Member



Hello all

I am planning to movea 4 year old site from one host to another this week.

I've never done anything like this before, so I wanted so opinions.

Story:
* php-code bases site
* mysql database

My procedure:
1) Get new host, copy over all code from old to new
2) Modify code (for hard coded folder paths)
3) Create DB on new host, with same name
4) Export DB from old host to a file
5) Import DB from file to new host
6) Change DNS name with domain name registrar to new site

Once I am sure it worked, I will delete everything from old host and cancel account

Is my logic sound?

A problem I have is how can I test the new host before changing the DNS name? I mean, I can't just type the address, nor can I type the IP of the new host (it's not a dedicated serever for me)

Thanks

lammert

11:51 pm on Dec 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can test it by adding the IP address of the shared webserver for this new host temporary to your local hosts file. Let's say that your domain name is www.example.com and your current webhost has IP address 111.111.111.111. The shared webserver of your new address has IP address 222.222.222.222.

You now add the following line to your hosts file on your local PC at home below the line that starts with 127.0.0.1:

222.222.222.222 www.example.com

On Windows this hosts file is probably found in (...)\SYSTEM32\drivers\etc\hosts and on Linux in /etc/hosts

Now, after you type www.example.com in your browser window, the browser will not query a DNS server for the IP address of the server, but rather go directly to 222.222.222.222.

Maybe a reboot is necessary to clear an internal DNS cache and on some installations the hosts file is not active by default.

Hugene

1:15 am on Dec 16, 2007 (gmt 0)

10+ Year Member



thanks for the tip

it's amazing we can control that too

coopster

9:23 pm on Dec 16, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Windows also has a
flushdns
switch for the
ipconfig
command that comes in handy which purges the DNS Resolver cache.

C:>ipconfig /flushdns

BillyS

10:31 pm on Dec 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>Once I am sure it worked, I will delete everything from old host and cancel account

I'd advise watching your old site for a little bit, making sure Googlebot and the like are going to the new site (making sure the DNS process has fully propogated).

Jon_King

10:43 pm on Dec 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Mr. G says:
[mattcutts.com...]

thecoalman

8:48 am on Dec 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



6) Change DNS name with domain name registrar to new site

Having just been down this road myself for the first time the one mistake I made was not also changing the IP's . My old host was also associated with the registrar and you could change the nameservers but it didn't do anything because you also have to provide the IP's for the nameservers. In my case this could only be done by the registrar which pretty much made it pointless to be able to change the nameservers in the first place...

Never saw this mentioned in any of the literature I read (possibly I did but this was a rush job and my head was swimming for few days)and since they were not listed on the registrar's page it never occurred to me.