Magento – Migrate products and categories

backupdatabase

What would be the easiest way to copy all products (including images) and categories from one installation of Magento to another one (completely empty and vanilla) on the same server?
I don't need to keep orders, users, etc. but only the products. I don't mind, however, copying these too. I also don't need them to keep the same keys, as long as the association with the appropriate categories stays the same.

Exporting to CSV and importing seems particularly messy, while just duplicating the database simply won't work…

Best Answer

The easiest way to move a database is to backup and restore, you can choose to remove all your orders on the new install. The total time (Depending on the server) would be less than 10 minutes!

mysqldump -p'PASSWORD' -uuser -hyourhost database1 > mydumpfile.sql
mysql -p'PASSWORD' -uuser -hyourhost database2 < mydumpfile.sql

All you need to do now is change the url for the site: Something like

Here is an easy way to find them

select * from core_config_data where value like 'http%';

Find the config_id's for your secure and unsecure address

then

update core_config_data set value = 'http://my.newdomain.com/' where config_id in (You list of ids');
  • List of id's must be something like this (6,7) etc

I can post a delete orders script if you want - The entire process is quick and efficient.

Related Topic