There are many times, for one reason or another, that I need to transfer a Drupal website from one server to another. I was used to using tools like Filezilla and phpMyAdmin to get most of the heavy lifting done, but after doing this many times I've found the command line to be my friend.
I use linode.com so I know how my server is configured, what's installed, and more importantly have shell access. If you use a shared host this guide/checklist probably won't help you out too much.
To prep the site I do a couple of quick changes:
- Set to offline mode to prevent any more changes taking place in the database
- Turn off caching/compressing mechanisms and flush all caches
Once those are done, here are the steps I use to transfer the site:
In my case the folder structure is usually set to something like the following:
/home/user/www/example.com
/cgi-bin
/htdocs
/logs