Voilà un post qui peut être bien utile…
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 22.214.171.124, so I would recommend install the same version as the old one. Say, old magento store version was 126.96.36.199 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.