Our blog

 

Migrate Magento to Alternative Server

There are a few simple steps you need to take to move your Magento based store from one place to another.

First of all, create a full SQL dump of your store's database and import this to a database on the new server. To do this, simply use the backup functionality within the Magento Admin. If you use phpMyAdmin things can become a bit weird.

Then copy all files apart from the contents of the /var/ folder to the web root of the new server.

Once the DB and the files are all in place, you need to edit the database settings in app/etc/local.xml to reflect the settings of the new server

Then you need to actually edit the DB and update two fields. To find the fields to edit run this query:

SQL:
  1. SELECT * FROM core_config_data WHERE path = 'web/unsecure/base_url' OR path = 'web/secure/base_url';

Then update these two fields to reflect the new base URL.

That's it.

Originally stated in this helpful forum post

More Reading:

7 Comments

admin
January 21st, 2009

another note -

search for %cookie% in the core_config_data table and update these as well

And aswell

watch out for caching.. Magento caches a lot of things which can be really confusing.

 

admin
April 8th, 2009

Further things that can go wrong..

Folder permissions.
Magento requires certain folders to be writeable. Notably, if it can't write to the /var directory then it will go into an infinite loop whilst it tries to create an error report and can't.

Store ID mismatches:
When creating your database dump the store ID's can get mixed up.

If you are getting error messages like:

CODE:
  1. Notice: Undefined index:  0  in /home/********/app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

then this could be an issue affecting you.

To check, compare the contents of your core_store and core_website tables on the new DB to the contents of the old DB you took the dump from. If they are different then you have this problem.

 

jon
July 1st, 2009

Hi,

I have tried this way 3 times and i am having a nightmare migrating the site, i am at the stage now where i am getting this error
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 89: parser error : Input is not proper UTF-8

I am in dyer need of help,

regards
Jon

 

admin
July 1st, 2009

hi Jon

not sure what that would be related to. If you want me to take a look get in touch via the contact form with more details

 

Andy White
October 21st, 2009

Hi there,
I am having the same problems after moving hosts. I have changed the database details password and name, changed the store defaults as per your instructions but am still stuck this:
Undefined index: 0 in /home/gothiccr/public_html/app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

I have been chasing this for a few hours now. I am not experiencesd in PHP, the hosting company are very helpful but have no magento experience, although the servers come up clean with magento-check.php.

How much would it be likely to cost me for you to have a look. Finances are of course tight!!

Best regards

Andy White

 

admin
October 22nd, 2009

have emailed you

 

ogray
November 14th, 2011

have anyone tried Cart2Cart service for magento migration?

 

 

Leave a Reply