This is a simple and quick method to move magento from an host to another. It would be prefereable to have enough skills in mysql and in linux command line to do that properly. Also direct acces in console to your both host can be helpfull but it's not required.

 

1/ Copy all files from actual location to the new one

Using ftp or command line in console mode. You must keep or correct ftp rights (chmod) according to you new location and check linux owner too (chown).

2/ Copy actual magento database to the new location

Using phpmyadmin (not a good idea, bacause of large amount of data) or you'll better give a try to the command line (much faster and successfull).

3/ Edit some keys in database

Open the new database with phpMyAdmin (or however you prefer), search for the [mage]core_config_data table, and edit the rows containing
web/unsecure/base_url
web/secure/base_url
keys according to your new url.

4/ Edit configuration file for database in magento

Edit the local.xml (app/etc/local.xml) file and update the database variables. Don't touch the security/encryption key!

5/ Edit Magento Connect Manager configuration file

The file is located under : downloader/connect.cfg
Change the absolute path located in it, that should be something like :
s:xx:"/var/www/html/my/site/web/magento/downloader/"
to
s:yy:"/var/www/html/my/new/siteweb/magento/downloader/"

xx is the lenght (in characters) of the original path value
yy will be the new lenght of the new path value - you should find a way to count that exactly !

6/ Clear directory content of old session and cache

Easy way to do that, is to get into theses directoris
/var/cache
/var/session
select all the content found in there, and delete it.

7/ Latest check and tests

Check if .htacces contains some hardcoded rewrite rule, mentionning your old domain/url.
Check index.php too, for the same reasons.
Test carrefully the new copied website and verify if the url in brwoser always is the new one you wanted to migarted to.

Search & Share