Magento, PHP, MySQL, AJAX, Zend, cPanel or OpenSource…
How to import / recover magento categories and products from the old store?
Well, I was really looking for a good way to import categories in magento, we know we can export and then import products gracefully from our old store but not categories. So, what you need to do is, you need phpMyAdmin to export and import tables or similar tool, though I would recommend phpMyAdmin.
- Step 1: Select the old database from where you would like to recover categories and products and click on export, please check the attached image file, you need to Disable Foreign Key checks and Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT.
- Step 2: Now, select all tables prefix with catalog and eav
- Step 3: finally Save as file
- Step 4: Install a fresh magento version, I have tested with version 1.4.0.1, so I would recommend install the same version as the old one. Say, old magento store version was 1.4.0.1 then install a fresh copy of the same version.
- Step 5: Now, select the fresh database in phpMyAdmin which you have just installed and import the same old SQL file which you had exported in Step 3
If you don’t see any errors then look at new magento store, hope you would see all the products and categories.
You might not see new categories at the frontend, login to admin panel and enable Use Flat Catalog Category / Product.
Don’t forget to use the old media directory and ReIndex Data (System -> Index Management)
This method will be helpful if you would like to recover categories and products from the old corrupted database. This sometime happens we can not fix the old database even if you use the old database and install fresh magento.
Let me know whether you have successfully recover the old database or not.
| This entry was posted by admin on September 4, 2010 at 5:14 pm, and is filed under General, Magento. Follow any responses to this post through RSS 2.0. You can skip to the end and leave a response. Pinging is currently not allowed. |


about 1 year ago
Thanks ! It is very useful to me !
about 1 year ago
I did this and after reindexing i get an error saying “some problem with reindexing process” any help would be appreciated, thanks.
about 1 year ago
@chris
have you used same version while imported database? Which version are you using?
I had faced same problem, though reinstalling helped to get rid of this error
about 1 year ago
Hello, i did everything in this tutorial, everything ok.
But when i want to view a product page in frontview i get 404 error but only with products, not with category page or any other page.
But when i create new products, then i dont get that error.
I tried to do reindex so many times and changed url rewrite various ways. Nothing….
Please help me find a way to get this working
about 1 year ago
I will try this category import method, thank you.
about 1 year ago
Hi Ricardo!
I am not sure whether you have fixed by anyway. I guess you have problem in somewhere else. Be sure products are visible. Let us know
Thanks!
about 1 year ago
I have this error:
– Filtros para las tablas descargadas (dump)
–
–
– Filtros para la tabla `catalogindex_aggregation`
–
ALTER TABLE `catalogindex_aggregation` ADD CONSTRAINT `FK_CATALOGINDEX_AGGREGATION_STORE` FOREIGN KEY ( `store_id` ) REFERENCES `core_store` ( `store_id` ) ON DELETE CASCADE ON UPDATE CASCADE
—————————
#1005 – Can’t create table ‘./database/#sql-30a_58dbef.frm’ (errno: 121)
CanĀ“t create a table, but … thanks in advance
about 1 year ago
It works! I tried two more times with different errors, but in the third it has worked!
Perfect, thanks, I’ve saved a long time
about 1 year ago
you are best
about 9 months ago
Hi – I am definitely happy to find this. Good job!
about 8 months ago
Hi – I am really delighted to discover this. cool job!
about 5 months ago
You make my day!!!