Moving a website to another host

Another task of web maintenance is moving a site from one web host to another.
Today I've got a site that has to be moved from its current web host.
The main body of this site is HTML with three php powered subsystems;

  1. a search function based on phpdig
  2. a custom coded survey php script
  3. a modified webdirectory php script
  4. an ad serving package phpads

Now this sounds like a web maintenance task that is not too difficult.
As always the killer is in the details.
The thing you want to do is to move at least a day before you have to shut down the old host. In the test phase after moving I always want to be able to look at the old site. Mostly you will have the new site up and running as a subdomain on the new host and the 'old' site still running on the old host under it's domain name (for this test to work you need to have different domain name servers).
The steps I take when moving a web site from one host to another are;

  • Compare the features of both hosts.Do all the features match and do they work likewise.
  • Check for correct authorization on both hosts.
  • Make a list of all databases and folders involved. make sure to note if they are localhost or a remote database server.
  • Make a list of all database privileges.
  • Make a list of all specific database optimizations.
  • Clear all temporary tables.
  • Make an SQL dump of the databases.
  • Make a list of special folder authorizations.
  • Make compressed files of the folders (or one big compressed file).
  • Copy unsavable hidden files. check for my.cnf php.ini .htaccess
  • Write down any cron job settings.
  • Write down any special "host administration panel" settings (think about image leeching settings).
  • Make a list of all email accounts.
  • Backup all email accounts.
  • Download stat files.

After doing all this it should be smooth sailing.

  • Restore and setup the databases
  • Restore the folders, the hidden files and all authorizations.
  • Test, test and test some more.

After checking everything it is time to switch the domain name servers so that the domain name points to the new host and then we can test some more.
One point I'd like to mention is that the DNS servers should be different (old, new), otherwise you will experience down time as long as 48 hours.
I'll update this post as we move along.