Changing servers- help

jason955 - July 2, 2009 - 15:12

I need to move a Drupal installation to a different server. I am going to transfer all of the files in my Drupal folder to the new server, dump the database, then repopulate the DB on the new server. I assume this will work fine so long as I change the database settings. Assuming this is all correct, I have no idea where to make the changes to the database for the login, password, etc. Any help would be great.

> I am going to transfer all

-Anti- - July 2, 2009 - 15:52

> I am going to transfer all of the files in my Drupal folder

Ensure that sites/default and sites/default/settings.php are chmod 755, otherwise they might not copy over.
It depends on your method of transfer.

> I have no idea where to make the changes to the database

The database username and password are set in sites/default/settings.php
FYI, that is also where you set the base url (subfolder) if needed.
You may need to chmod settings.php to 755 before being allowed to edit it.

> dump the database

How big is it when compressed? Remember that phpmyadmin has a 2mb limit for importing.
If >2mb you'll have to import using ssh or a script like 'bigdump'.

If you have problems with import/export using phpmyadmin, another way is to use the backup & migrate module. Backup the DB using it. Move your files over to the new server but use a blank settings.php file (or the default_settings.php file supplied). When you go to your domain, drupal will install. So now you have a fresh install, you can enable B&M in the admin modules section, then go into the B&M config page, and import your backed-up database. This will put your site back exactly as you had it.

Good luck

 
 

Drupal is a registered trademark of Dries Buytaert.