Import magento category and product table only

Import magento category and product table only

July 20, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Import magento category and product table only

Migrating Magento Category and Product Data Between Stores

As an experienced developer, I often encounter scenarios where clients need to transfer specific data between two Magento applications while keeping other settings intact. In your case, you want to migrate only the category and product tables from APP A to APP B. Let me guide you through this process step-by-step.

Understanding Your Requirements

You’re dealing with two Magento installations: one is serving as a source of reliable category and product data (APP A), while the other has unique settings and configurations that must remain untouched (APP B). To achieve your goal, we’ll need to extract only the required tables from APP A’s database and integrate them into APP B.

Planning the Migration Strategy

Before diving into the technical details, let’s outline our approach:

  1. Identify the specific tables: In Magento, the primary tables for categories are catalog_category_entity and its related tables like catalog_category_entity_varchar, catalog_category_entity_int, etc. For products, you’ll need to consider catalog_product_entity along with similar related tables.

  2. Export the data: We’ll use MySQL’s mysqldump utility to export only the necessary tables from APP A’s database.

  3. Modify the exported data (optional): If there are any conflicts or overlaps between the two databases, you might need to clean up duplicate entries or handle them manually before importing.

  4. Import the data into APP B: We’ll use a similar approach with mysql commands to import the data into APP B’s database.

Step-by-Step Guide

1. Exporting the Data from APP A

First, let’s create a backup of only the required tables using mysqldump:

mysqldump -u <APP_A_username> -p<APP_A_password> --databases <APP_A_database_name> catalog_category_entity catalog_product_entity > category_products.sql

Replace <APP_A_username>, <APP_A_password>, and <APP_A_database_name> with your actual credentials. This command will create a file named category_products.sql containing the exports of both tables.

2. Handling Conflicts (if any)

If there are any duplicate SKUs or product IDs that might cause conflicts, you can modify the exported SQL file to ensure consistency:

-- Assuming we have a conflict with product ID 100 in APP B
UPDATE catalog_product_entity SET entity_id = 200 WHERE entity_id = 100;

3. Importing the Data into APP B

Now, let’s import the data into APP B’s database:

mysql -u <APP_B_username> -p<APP_B_password> --database <APP_B_database_name> < category_products.sql

Again, replace the placeholders with your actual credentials.

Best Practices and Troubleshooting Tips

  • Always backup both databases before performing any data migrations to ensure data integrity.
  • If you encounter errors during the import process, check the MySQL error logs for more specific details. You can find them in /var/log/mysql/error.log or /logs/mysql_error.log depending on your installation configuration.

Conclusion

Migrating only specific tables between Magento installations requires a careful approach to avoid conflicts and ensure data consistency. By following this step-by-step guide, you should be able to transfer the category and product data from APP A to APP B without affecting other settings in APP B.

Remember, if you’re dealing with large databases or complex migrations, it’s always recommended to seek professional assistance from experienced Magento developers. At Laravel Company, our team specializes in Magento development services and can help you navigate even the most challenging data migration scenarios.

Don’t hesitate to reach out if you need further guidance or have any questions regarding your specific use case. Happy migrating!

Catalog Database Configuration Import/Export

Our network