Home›Uncategorised›Mastering Magmi: The Complete Guide to Mass Import in Magento
Uncategorised

Mastering Magmi: The Complete Guide to Mass Import in Magento

📅 15 October 2026 · ⏱ 3 min read · 👤 Maya Simard

Step by step: installing Magmi, your first import, profiles, plugins, cron and the usual pitfalls.

Published 2026-10-15 • Category: Tutorials • Reading time: 12 min

Intro: Why not the stock Magento Importer

If you’ve ever run the native Magento 1 importer under Catalog → Import/Export, you know the story: 10,000 products takes two hours, 50,000 takes overnight, 500,000 takes a week of white-knuckle PHP max_execution_time anxiety and 500 errors.

Magmi flips the table. Instead of going through the Magento model layer, Magmi writes directly to the database tables and triggers only the indexes it needs. The result — on a test rig with MySQL 8 and NVMe storage, Magmi imports 1,000 products in ~4 seconds, and 100,000 simple products with 3 images each in roughly 18 minutes.

Step 1: Installation

Magmi is a plain PHP folder. No Composer, no Docker, no outlandish dependencies. All you need:

  1. PHP ≥ 5.4 (also runs on 7.4 and 8.1 via a minimal fork)
  2. Access to the Magento database
  3. A writable directory for logs
cd /var/www/your-magento/
wget https://github.com/dweeves/magmi-git/archive/master.zip
unzip master.zip
mv magmi-git-master magmi
cd magmi/magmi/web
php -S 0.0.0.0:8888

Done. Open http://your-domain/magmi/magmi/web/magmi.php, enter your Magento DB password (the DB password, not the store admin one) — you’re inside the Magmi console.

Step 2: Your first profile

A profile in Magmi is a preset: which CSV, which plugins are on, how columns are mapped. Let’s set up a profile for a simple price list.

sku,name,price,qty,visibility,status
WIDGET-01,Widget One,19.99,100,4,1
WIDGET-02,Widget Two,29.99,50,4,1

In Magmi UI → New Profile → Enable:

  • CSV Data Source — point it at the file or upload one
  • Attribute Set Rewrite — so new products get the right attribute set immediately
  • Default values — type_id=simple, website_ids=1, attribute_set_id=4

Save. Click Run Import. Wait ~2 seconds. Open Magento Admin → Catalog → Manage Products — both products are there.

Step 3: The plugins you’ll actually use

Magmi without plugins is like Magento without modules. Here are the top 6 plugins that 95% of stores need:

  1. Image Attach Processor — auto-attaches photos following a media/import/ pattern
  2. URL Key / Rewrites — generates or refreshes clean URLs
  3. Attribute Set Rewrite — one column = one attribute set
  4. Inventory Update — works with the MSI multi-source strategy
  5. Related/Up/Cross-Sell — product relations by SKU
  6. Tier Price — volume / customer-group pricing

Rule of thumb: if you repeat something in the CSV for every product — build a plugin or use default values.

Step 4: Running from the CLI and cron

The UI is great for authoring profiles, but in production everything should run from the command line. Magmi handles that out of the box.

cd /var/www/magento/magmi/magmi/cli
php magmi.cli.php -profile=my_import -mode=update -CSV:filename=/import/products.csv

Add it to crontab:

# hourly stock sync
15 * * * * php /var/www/magento/magmi/magmi/cli/magmi.cli.php -profile=stock_sync -mode=update >> /var/log/magmi.log 2>&1

Add a file lock so two cron runs don’t collide:

flock -n /tmp/magmi.lock -c "php /path/magmi.cli.php -profile=stock_sync"

Step 5: Common pitfalls and how to avoid them

Over 15 years the community has catalogued these rakes. Learn them and save yourself weeks:

  • UTF-8 BOM in CSV breaks the first column. Open the file in Notepad++ and save as UTF-8 (no BOM).
  • Commas inside descriptions — friend: TSV or CSV with " as the quote char.
  • MySQL max_packet_size defaults to 16 MB. For imports with long descriptions, raise it to 128 MB.
  • Reindex after import — Magmi does not reindex automatically. Run php bin/magento indexer:reindex after bulk imports.
  • Image path matching — the images folder must be readable by www-data. Check chown.

Conclusion

Magmi isn’t “yet another importer.” It’s a philosophy: direct, predictable, fast. Set up your profiles and cron once, and you can forget nightly import stress and go back to what you built the store for — selling.

In the next article we cover CSV vs JSON and when to move from classic Magmi to its JSON datapump.

Leave a Reply

Your email address will not be published. Required fields are marked *