Magento 2 Product Import/Export Setup

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1 servicesAll 2065 services
Magento 2 Product Import/Export Setup
Medium
~3-5 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Configuring Product Import/Export in Magento 2

Import/export is one of the most resource-intensive operations in Magento 2. The built-in mechanism works via CSV with a strictly defined column schema. With improper configuration, importing 10,000 SKUs can take several hours and crash with memory/timeout errors. Proper batch size configuration, indexing, and memory management solve most problems.

Formats and CSV Structure

Magento 2 supports import of: catalog_product, catalog_category, customer, customer_address, customer_finance, stock_sources (MSI).

Required columns for products:

Column Description Example
sku Unique identifier prod-001
store_view_code Empty = admin scope en, de
attribute_set_code Attribute set Default
product_type Product type simple, configurable
name Name Winter Jacket
price Price 1299.00
qty Quantity (legacy, without MSI) 100
visibility Visibility Catalog, Search
status Status 1

For configurable products, additional columns needed: configurable_variations and configurable_variation_labels.

sku,attribute_set_code,product_type,name,price,configurable_variations,configurable_variation_labels
jacket-base,Default,configurable,Winter Jacket,1299.00,"sku=jacket-red-s,color=Red,size=S|sku=jacket-red-m,color=Red,size=M","Color=Color,Size=Size"
jacket-red-s,Default,simple,Winter Jacket Red S,1299.00,,,
jacket-red-m,Default,simple,Winter Jacket Red M,1299.00,,,

Performance Optimization

Default Magento settings not designed for large volumes. Key parameters in app/etc/env.php and server configuration:

// Increase batch size for import
// app/code/Vendor/Import/etc/di.xml
<type name="Magento\ImportExport\Model\Import">
    <arguments>
        <argument name="data" xsi:type="array">
            <item name="bunch_size" xsi:type="number">500</item>
        </argument>
    </arguments>
</type>
# php.ini for import processes
memory_limit = 2G
max_execution_time = 3600
max_input_time = 3600

# Disable unnecessary indexers during import
bin/magento indexer:set-mode schedule cataloginventory_stock catalog_product_price catalogsearch_fulltext

Import via CLI and API

For automation use CLI command or REST API:

# Standard import via CLI
bin/magento import:run \
  --entity=catalog_product \
  --behavior=append \
  --validation-strategy=validation-skip-errors \
  --allowed-error-count=100 \
  --input-file=var/import/products.csv

# With delimiter and encoding specification
bin/magento import:run \
  --entity=catalog_product \
  --behavior=add_update \
  --field-separator=";" \
  --multiple-value-separator="|" \
  --input-file=var/import/products_semicolon.csv

REST API for import (Magento 2.3+):

# Create job via API
curl -X POST "https://example.com/rest/V1/import/csv" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "source": {
      "entity": "catalog_product",
      "behavior": "append",
      "validationStrategy": "validation-stop-on-errors",
      "allowedErrorCount": "0",
      "csvData": "c2t1LG5hbWUscHJpY2U..."
    }
  }'

Export Configuration

Export in Magento 2 works via same filters as import. For large catalogs, asynchronous export is needed via scheduled export:

// Programmatic export via ExportFactory
use Magento\ImportExport\Model\ExportFactory;

class ProductExporter
{
    public function __construct(private ExportFactory $exportFactory) {}

    public function export(array $filters = []): string
    {
        $export = $this->exportFactory->create();
        $export->setData([
            'entity'        => 'catalog_product',
            'file_format'   => 'csv',
            'fields_enclosure' => 1,
        ]);

        $export->filterAttributeCollection(
            $export->getEntityAttributeCollection()
        );

        return $export->export();
    }
}

MSI (Multi-Source Inventory) Import

With Magento 2.3+, use MSI for warehouse management. Stock import by sources:

source_code,sku,quantity,status
warehouse-moscow,jacket-red-s,50,1
warehouse-spb,jacket-red-s,30,1
warehouse-moscow,jacket-red-m,0,0
bin/magento import:run \
  --entity=stock_sources \
  --behavior=append \
  --input-file=var/import/stock_msi.csv

Common Issues and Solutions

Memory exhausted: increase memory_limit to 2–4G, reduce bunch_size to 200–300 records.

URL key already exists: with append behavior Magento checks URL uniqueness. Use add_update or clear url_rewrite table before import.

Invalid value for Attribute Set: value in attribute_set_code must match database name exactly — case sensitive.

Slow indexing after import: in realtime indexer mode each bunch triggers indexing. Switch to schedule, execute import, then run indexing manually:

bin/magento indexer:reindex catalog_product_attribute catalog_product_price catalogsearch_fulltext catalog_product_category

Execution Timeline

  • Setup and test import up to 1,000 SKU: 1 day
  • Development of custom ERP-sync adapter: 3–5 days
  • Scheduled import setup with error monitoring: 2–3 days
  • 50,000+ SKU catalog migration from another platform: 5–10 days