1) Disable clean URLs, clear the cache, set logs to a short lifetime, then run cron to clear old ones. (All but the first one there is just to reduce the size of the database dump.
2) mysqldump oldserver > mydatabase.sql
3) mysql newserver < mydatabase.sql
4) Copy entire Drupal directory from old server to new server, being careful to get the .htaccess file with it.
5) Edit settings.php to specify the new database login info.
6) Enable Clean URLs again.
7) There is no step 7. :-)
(I recommend disabling clean URLs in case there's an issue on the new server. You don't want all your links to be broken.)
Really, Drupal is an extremely portable system. I do the above process to move from development servers to live servers on a regular basis. 98% of the time is spent waiting for files to copy. :-)
On Friday 19 October 2007, Roy Smith wrote:
As an old-time unix hacker, I know my way around the inside of a web server pretty well, but right now I'm in "I want a tool not a hobby" mode and need to find a web hosting service for a club I belong to. There seem to be plenty of places out there offering amazing amounts disk/bandwidth/etc for amazingly low prices, and it's not clear how to determine which are fly-by-night and which are reliable.
So, the question is, if I go with a hosting service and later decide to switch to a different provider, how hard is it to pick up my drupal-based site and move it to another host? Is it as simple as finding another place that offers LAMP services, dumping the database, and restoring it onto the new server? And, of course, changing the DNS registration.
-- roy@panix.com