Migrating Magento to New Server

Migrating Magento to New Server

First login to current server via SSH

Then use this command within public_html folder:
tar -czf backup.tar.gz *

now copy the backup file to new server, unzip in location on new server

Now backup the DB

mysqldump -u USERNAME -p DBNAME > db_backup.sql

copy this to new server too. If WAMP do this: Windows > CMD

then goto this dir:
cd wamp\bin\mysql\mysql4.1.22\bin
Copy the DB backup to this dir

Now enter this command:
mysql.exe -u root -p databasename < filename.sql

no need for password

also change the core_config table to reflect new server