Magento Catalog Management — Import/Export, CSV, Bulk Operations
In this tutorial, you'll learn Magento catalog management: importing and exporting products via CSV, creating scheduled import/export profiles, performing bulk product updates, using inventory management tools, and maintaining catalog data at scale.
What You'll Learn
- Exporting products to CSV from the admin panel
- Understanding the product CSV column structure and field mapping
- Importing products via CSV with validation and error handling
- Creating scheduled import and export profiles with FTP
- Performing bulk product updates (status, attributes, categories)
- Using bulk catalog and inventory update tools
- Managing inventory sources and stock items in bulk
- Best practices for large catalog maintenance
Why It Matters
When a catalog grows to hundreds or thousands of products, manual editing through the product grid becomes impossible. Merchandisers need to update prices, activate seasonal products, and adjust inventory in bulk. CSV import/export is the backbone of catalog management at scale. A Magento developer who understands the import CSV format and the import workflow can onboard suppliers, run seasonal updates, and maintain data quality across thousands of SKUs.
Real-World Use
An electronics distributor receives a daily CSV feed from each of 20 suppliers. Each feed contains product updates: new products, price changes, stock levels, and discontinued items. The distributor uses Magento scheduled imports with FTP to pull each supplier's CSV at midnight, validate the data, apply updates, and email the buyer if any products failed to import. This fully automated pipeline keeps a 50,000-product catalog current without manual data entry.
Learning Path
flowchart LR A["Store Configuration"] --> B["Catalog Management
You are here"]:::current B --> C["Content Management"] C --> D["Marketing Tools"] classDef current fill:#38bdf8,color:#0f172a,stroke-width:2px
Exporting Products
Before importing, let's look at the export format. Magento can export products to CSV directly from the admin.
- Go to System > Data Transfer > Export.
- Configure:
Entity Type: Products
Export File Format: CSV
Filter: (optional — export only specific products)
SKU: starting with ELEC-
Stock Status: In Stock
Price: greater than 10
- Click Export.
Magento generates a CSV file containing all product data. The CSV can have hundreds of columns depending on your attribute set. Let's examine the critical columns.
Product CSV Columns
The CSV header row contains attribute codes as column names. Here are the essential columns:
sku,name,product_type,category_ids,attribute_set_code,price,cost,weight,status,visibility,tax_class_id,description,short_description,meta_title,meta_description,image,small_image,thumbnail,url_key,stock_data.qty,stock_data.is_in_stock,stock_data.manage_stock,stock_data.use_config_manage_stock,qty_increments
Let's break them down by category.
Identity columns:
| Column | Description | Example |
|---|---|---|
sku |
Unique product identifier (required) | ELEC-001 |
name |
Product name (required) | Wireless Bluetooth Headphones |
product_type |
simple, configurable, grouped, bundle, virtual | simple |
attribute_set_code |
Must match existing attribute set | Default |
Pricing columns:
| Column | Description | Example |
|---|---|---|
price |
Base product price | 49.99 |
cost |
Cost for margin calculation | 29.99 |
special_price |
Promotional price | 39.99 |
special_from_date |
Start date for special price | 2026-06-01 |
special_to_date |
End date for special price | 2026-06-30 |
tax_class_id |
Taxable goods (2) or None (0) | 2 |
Inventory columns:
| Column | Description | Example |
|---|---|---|
stock_data.qty |
Available quantity | 150 |
stock_data.is_in_stock |
1 (in stock) or 0 (out of stock) | 1 |
stock_data.manage_stock |
Enable stock management | 1 |
stock_data.use_config_manage_stock |
Use system config (1) or override (0) | 0 |
stock_data.min_qty |
Minimum qty before backorder | 10 |
qty_increments |
Must buy in increments of this | 1 |
Catalog structure columns:
| Column | Description | Example |
|---|---|---|
category_ids |
Pipe-separated category IDs | 3,5,8 |
visibility |
1=Not Visible, 2=Catalog, 3=Search, 4=Catalog & Search | 4 |
weight |
Product weight (required for physical) | 0.5 |
status |
1=Enabled, 2=Disabled | 1 |
Media columns:
| Column | Description | Example |
|---|---|---|
base_image |
Relative path to main image | /e/l/elec-001.jpg |
small_image |
Thumbnail image | /e/l/elec-001.jpg |
thumbnail |
Cart thumbnail | /e/l/elec-001.jpg |
additional_images |
Pipe-separated extra images | /e/l/elec-001-2.jpg|/e/l/elec-001-3.jpg |
Image paths are relative to pub/media/import by default.
Importing Products
To import products, go to System > Data Transfer > Import.
- Set Entity Type to Products.
- Choose Import Behavior:
| Behavior | What It Does |
|---|---|
| Add/Update | Creates new products, updates existing (matched by SKU) |
| Replace | Deletes existing product data and replaces with CSV values (use with caution) |
| Delete | Removes products whose SKUs are in the CSV |
- Select your CSV file.
- Click Check Data to validate.
Validation and Error Reports
Magento validates the CSV before importing:
- Required fields (SKU, name, price, etc.) must be present
- Attribute values must exist in the system
- Category IDs must reference existing categories
- Image files must exist in the import directory
If validation fails, Magento shows a detailed error report:
Row 12: SKU "ELEC-002" has an invalid value for "price" ("abc")
Row 15: SKU "ELEC-005" references category ID 999 which does not exist
Row 23: SKU "ELEC-008" is missing required field "name"
Row 31: Image file "/images/missing.jpg" was not found in import directory
You can download the error report as CSV, fix the issues, and re-upload.
After successful validation:
Import started: 1,200 rows
Validation: 1,195 passed, 5 errors
Execution time: 3.2 seconds
Products imported: 1,195
Import File Location
You can also place CSV files directly in the server's import directory:
# Default import directory
var/import/
# Place CSV file
cp /home/user/products.csv /var/www/magento/var/import/
# Run import via CLI
bin/magento import:run product
Or specify the file from admin by selecting File on Server instead of uploading.
Scheduled Import/Export
For recurring catalog updates, create scheduled import/export profiles.
- Go to System > Data Transfer > Scheduled Import/Export.
- Click Add Scheduled Import.
- Configure:
Name: Supplier A Nightly Import
Description: Import product updates from Supplier A
Entity Type: Products
Import Behavior: Add/Update
File: /var/import/supplier_a_products.csv
Import Settings:
FTP Server: ftp.supplier-a.com
FTP User: magento
FTP Password: *****
File Path: /exports/products.csv
Schedule:
Status: Enabled
Frequency: Daily
Start Time: 02:00
Email: buyer@example.com
Email Failed: Yes
Magento connects to the FTP server at the scheduled time, downloads the file, runs the import, and emails results.
Scheduled exports work the same way but in reverse:
Name: Weekly Catalog Export
Entity Type: Products
Export File Format: CSV
FTP Server: ftp.example.com
FTP User: magento
FTP Password: *****
File Path: /imports/catalog.csv
Frequency: Weekly
Bulk Product Updates
Magento provides bulk product update tools for making changes to many products at once.
Bulk Status Update
To disable products in bulk:
- Go to Catalog > Products.
- Select products using checkboxes.
- From the Actions dropdown, choose Change Status.
- Set Status to Disabled.
- Click Submit.
Bulk Attribute Update
To update attributes across many products:
- Select products in the product grid.
- Choose Update Attributes from Actions.
- You see a form with all product attributes.
- Check the attributes you want to change and enter new values:
Change:
- Visibility: Search only
- Tax Class: Taxable Goods
- Manufacturer: Brand X (if it is a dropdown attribute)
- Click Save.
Bulk Category Assignment
To assign products to a category in bulk:
- Select products.
- Choose Assign Categories from Actions.
- Select the target category.
- Choose Assign or Remove.
- Click Submit.
Bulk Stock Update
For inventory in bulk:
- Go to Catalog > Products.
- Filter by condition (e.g., stock quantity).
- Select all matching products.
- Choose Update Stock from Actions.
Change:
- Qty: Set to 500 (absolute value)
- Stock Status: In Stock
- Manage Stock: Yes
Inventory Bulk Update (MSI)
Magento Inventory (MSI) adds source management. To update inventory per source in bulk:
- Go to Catalog > Products.
- Select products.
- Choose Advanced Inventory from Actions.
- Select the source:
Source: Main Warehouse
- Source Quantity: 0 (set to zero to clear)
- Source Status: In Stock
For multi-source inventory, you can update individual source quantities per product in bulk.
Catalog Price Rules Bulk Update
Catalog price rules apply discounts to many products at once. Instead of editing each product's special price, create a catalog rule.
- Go to Marketing > Promotions > Catalog Price Rules.
- Click Add New Rule.
- Configure:
Rule Name: Summer Sale 15% Off Electronics
Status: Active
Customer Groups: General, NOT LOGGED IN
Conditions:
Category is 8 (Electronics)
Actions:
Apply: Apply a percentage of product price discount
Discount Amount: 15
This rule applies a 15% discount to all Electronics products for General and guest customers. The discount is indexed and applied to product listing prices.
CSV Best Practices
When working with large CSV imports, follow these rules:
Use the correct line endings. Windows uses \r\n and Unix uses \n. Magento handles both, but be consistent. If you see "unexpected end of data" errors, check line endings.
Escape special characters. If a product name contains a comma, wrap it in double quotes:
sku,name,price
ELEC-001,"Wireless Headphones, Bluetooth 5.0",49.99
Keep category IDs valid. Category IDs must exist in the system before import. If you import a CSV referencing category 150 and that category does not exist, the row fails. Either create categories first or import with category path names.
Use the validation step. Always click Check Data before importing. A single bad row can halt the entire import depending on the error type.
Batch large imports. For catalogs over 10,000 products, split into multiple files of 5,000-10,000 rows. Magento processes imports in a single Transaction for each file. Smaller batches reduce the risk of timeouts.
Common Mistakes
Incorrect SKU matching during import. When using Add/Update behavior, Magento matches rows to existing products by SKU. If SKUs have trailing spaces, the match fails and a new product is created. Trim SKUs in the CSV before importing.
Missing image files. The import CSV specifies image paths, but the actual image files must be in
pub/media/import/. If images are missing, the import succeeds but products have no images. Always verify image files exist before importing.Running large imports during business hours. Importing 20,000 products locks catalog tables and causes timeout errors for shoppers. Always schedule large imports during low-traffic hours or use the maintenance mode.
Forgetting to reindex after import. Product imports do not automatically trigger reindexing. Run
bin/magento indexer:reindex catalog_product_price catalog_product_categoryafter import to update prices and category associations.Using the Replace behavior without a backup. Replace deletes existing attribute values before inserting CSV values. If the CSV is missing columns, the data for those attributes is lost. Always back up the database before using Replace, or use Add/Update instead.
Practice Questions
What happens if you import a CSV with a SKU that already exists in the system? Answer: With Add/Update behavior, the existing product is updated with the CSV values. Fields not present in the CSV are unchanged (for Add/Update). With Replace behavior, all attribute values are deleted and replaced with CSV values, even for fields not in the CSV.
How do you import products with images? Answer: Specify image file names in the
base_image,small_image, andthumbnailcolumns. Place the image files inpub/media/import/(or the configured import directory). Images can also be imported via URL usingbase_imagestarting withhttp://(Magento downloads them during import).What is the purpose of the Check Data step before importing? Answer: The Check Data step validates every row in the CSV without making changes. It checks required fields, attribute values, category IDs, and image file existence. It generates a detailed error report so you can fix issues before the actual import, preventing partial imports and data corruption.
Challenge: Build an automated catalog update pipeline. Create a Magento PHP script that reads a CSV file from a supplier feed, validates the data against Magento MySQL schema (checking category IDs and attribute set codes exist), generates a diff report showing what will change, and then executes the import using Magento's
\Magento\ImportExport\Model\ImportAPI. The script should handle 10,000+ rows and email a summary report with failed rows. Then create a scheduled import profile in admin that imports this file from FTP daily at 3 AM.
FAQ
Mini Project
Your task: Build a complete catalog import workflow for a home furnishings store adding 500 new products.
- Export the existing catalog to understand the CSV format. Study the column structure.
- Create a CSV with 10 sample products for a new "Premium Bedding" line with these requirements:
- 1 configurable product (Premium Bamboo Sheet Set) with 4 child simple products (Twin, Full, Queen, King)
- 3 standalone simple products (Pillow Set, Duvet Cover, Mattress Topper)
- Category assignment: all go to "Bedding" category (ID 15) and "Premium" category (ID 22)
- All products have images placed in
pub/media/import/bedding/ - Pricing: $49.99 to $199.99
- Inventory: 100 units each with stock management enabled
- Run the import via admin. Fix any validation errors.
- Create a scheduled export that generates a weekly CSV of all products in the Bedding category.
- Write a bash script that downloads a CSV from a test FTP server, moves it to
var/import/, triggers the import viabin/magento import:run product, and checks the import log for errors. - Run
bin/magento indexer:reindex catalog_product_priceand verify products appear in the frontend.
What's Next
Now that you can manage the catalog at scale, learn how to manage content in Magento:
Continue to Lesson 19: Content Management — Pages, blocks, widgets, and WYSIWYG.
Related lessons:
- Categories and Attributes — Understanding CSV attribute columns
- Product Types — Configurable product CSV structure
- Inventory and Stock — Inventory import columns
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro