Comment importer des produits dans Magento 2 dans 2026: Le guide de travail pour 2.4.8 - FR

Adobe a livré Magento 2.4.8 en avril 8, 2025, et la manière dont les gros catalogues circulent sur la plateforme a finalement rattrapé 2026. Les points de terminaison d’importation REST natifs (/V1/import/csv et /V1/import/json) accepte désormais les charges utiles codées en base64 et la compression gzip. That kills the oldsplit your CSV into 500 rows and prayroutine. The admin CSV importer most stores still lean on? Same tool, surtout. But the ways it breaks have moved, and so have the fixes. This guide covers both paths, and the mistakes that eat a weekend when you miss them.

Réponse rapide: For catalogs under 5,000 SKU, use the admin CSV importer under System > Transfert de données > Importation. For anything larger or automated, hit the REST /V1/import/csv endpoint ajouté dans 2.4.8. Keep files UTF-8 without BOM, drop images into var/import/images, and always run “Vérifier les données” avant de s'engager.

Comment importer des produits dans Magento 2? image

Dernière révision: avril 2026. Endpoints, version numbers, and import behaviors verified against Adobe Commerce 2.4.8 release notes and the Experience League documentation.

Avant de commencer: What Changed in 2.4.8

If you’ve imported products on Magento 2.4.5 or earlier, a few defaults caught up with reality. Nouveau 2.4.8 installs ship with indexers in Update by Schedule mode, so bulk imports no longer grind the frontend to a halt during reindex. The release closed 497 core bugs (several on the importer itself) and added the REST import endpoints that sidestep the 2MB admin upload ceiling.

Here’s what you need in place before touching the importer:

  • Magento 2.4.8 ou plus tard. En cours d'exécution 2.4.5 ou plus? Upgrade first. The older importer still works, but bug fixes aren’t being backported.
  • PHP 8.3 le minimum, 8.4 conseillé. 2.4.8 ships with native PHP 8.4 soutien. Stores on PHP 8.1 will import, but error handling is noisier.
  • MySQL 8.0 ou MariaDB 10.6/11.4. 2.4.9-beta1 drops MySQL 8.0 et MariaDB 10.6, so if you’re setting up fresh, aller 11.4.
  • A writable var/import/images directory. Autorisations: 775 pour les répertoires, 664 pour les fichiers, owned by your web user.
  • Sufficient PHP limits. For catalogs over 10,000 SKU, memory_limit 2G et max_execution_time 1800 in php.ini. Lower values will silently kill imports partway through.

A quick heads-up: Adobe Commerce (the paid tier) and Magento Open Source share the importer code. Cloud customers don’t need to touch php.ini because the stack comes pre-tuned, but the CSV rules and behaviors below apply identically.

What You Can Actually Import

Magento 2 has six product types, and the CSV rules shift depending on which one you’re moving. The short version:

  • Simple products. One SKU, one variation. The template every tutorial uses. Import these first if you’re learning.
  • Configurable products. A parent SKU with child simples attached via configurable_variations. Size and color t-shirts are the textbook example. Children must exist before the parent import row, or the link fails.
  • Virtual products. Prestations de service, abonnements, warranty coverage. No shipping calculation, no weight column needed.
  • Grouped products. A wrapper that shows several simples on one page (thinkkitchen knife set, buy individually”). Les usages associated_skus in the CSV.
  • Bundled products. Build-your-own combos where the customer picks options. Format is fiddly and uses bundle_values with pipe-separated fields.
  • Downloadable products. Des dossiers, licences de logiciels, ebooks. Needs downloadable_links configured.

Import order matters. Simples first, then configurables that reference them, then grouped and bundled last. Importing a configurable whose child SKUs don’t exist yet is the most common self-inflicted error, and the validator won’t always catch it before the import runs.

CSV Import: The Admin Walkthrough

The admin CSV importer handles catalogs up to about 5,000 SKUs without complaint. Worth knowing even if you plan to move to the API later, because the column rules that follow apply to both paths.

Étape 1: Export a Sample File (Don’t Skip This)

Aller à Système > Transfert de données > Importation. Ensemble Type d'entité à Des produits, puis clique Télécharger un exemple de fichier. The sample matches your exact Magento install, including any custom attributes your store has added. Using a generic CSV template from a blog post is how column-mismatch errors start.

Save the sample, open it in Notepad++ or VS Code. Don’t use Microsoft Excel. Excel adds a Byte Order Mark to UTF-8 files, and the importer rejects BOM-prefixed files without a clear error message. If Excel is your only option, export asCSV UTF-8and run the file through a BOM remover, or switch to Google Sheets (Fichier > Télécharger > CSV, which saves clean UTF-8).

Étape 2: Fill In Your Product Rows

Required columns for a simple product: sku, store_view_code, attribute_set_code, product_type, catégories, product_websites, Nom, la description, prix, qty, poids, product_online, tax_class_name, visibilité.

Keep descriptions under ~255 characters per row if you’re on the admin importer. Longer HTML descriptions work, but they inflate file size fast and drag the 2MB default limit closer. Categories use slashes to build hierarchy: Default Category/Apparel/T-Shirts. The separator is a forward slash, not a backslash. One relief: Magento auto-creates category paths that don’t exist yet, so you don’t need to pre-build every category before import.

For configurables, le configurable_variations column carries a pipe-delimited string like:
sku=SHIRT-RED-S,size=S,color=Red|sku=SHIRT-RED-M,size=M,color=Red

Fiddly, Oui. Save yourself pain by exporting one hand-built configurable first, then using that row as your template for the next 5,000.

Étape 3: Configure the Import Behavior

What happens when a SKU in your CSV already exists in the catalog? Three behavior options decide, and picking the wrong one can erase data:

  • Add/Update. The default and the safe pick. Adds new SKUs, updates matching ones, leaves unlisted products alone.
  • Remplacer. Deletes matching SKUs first, then recreates them from the CSV. Wipes URLs, Commentaires, and stock movement history on those products. Use rarely.
  • Delete Entities. Removes matching SKUs from the catalog. Irreversible without a database restore.

Also set Field separator to comma, Multiple value separator to comma, and check Nombre d'erreurs autorisées. Default is 10. Crank it to a higher number if you expect some rows to fail and want the importer to keep going rather than abort.

Étape 4: Validate Before You Import

Upload your CSV, Cliquez sur Vérifier les données, et attends. This runs the same validation the real import does, but without writing to the database. The output lists every row error by number with the specific column that failed. Fix the CSV, re-upload, re-check. Rinse until green.

If validation saysFile is validbut some warnings appear, read them anyway. Warnings are often missing category paths or store views that Magento will silently skip, creating products with incomplete category trees.

Étape 5: Run the Import

Cliquez sur Importation. The progress bar is honest for small files and optimistic for large ones. Don’t close the browser tab. Don’t refresh. The importer runs a single long PHP process, and on slower hosting, closing the tab mid-write orphans the process and leaves partial data behind. Watch var/log/import.log over SSH if you want live progress, ou vérifiez Système > Import History once it finishes.

Images et médias

Images confuse more imports than any other field. The rule is simple once you’ve seen it once.

FTP or SFTP your image files into <Magento root>/var/import/images. Subfolders are allowed: var/import/images/2026-spring œuvres. In the CSV, reference each image by its path relative to var/import/images:

  • base_image colonne: main product image (shown on product page)
  • petite_image colonne: thumbnail for category pages
  • thumbnail_image colonne: cart and order thumbnails
  • additional_images colonne: gallery images, comma-separated

A row importing one product with four gallery shots might look like: /2026-spring/tshirt-red-main.jpg dans base_image, puis /2026-spring/tshirt-red-back.jpg,/2026-spring/tshirt-red-detail.jpg,/2026-spring/tshirt-red-fabric.jpg dans additional_images.

Watch the file naming. Magento treats Shirt.jpg et shirt.jpg as different files on Linux hosts, and the importer doesn’t auto-correct case. Compress to WebP before upload if you can; hero shots at 300-400KB JPEG will tank your Core Web Vitals the moment real traffic hits. Notre Magento speed playbook covers WebP and AVIF conversion for existing catalogs.

REST API Import: le 2.4.8 Path for Large Catalogs

The admin importer caps out fast. Once you’re past 10,000 SKUs or you need automated syncs from an ERP, the REST endpoints Adobe shipped in 2.4.8 are the right tool. Two endpoints matter:

  • POST /rest/<store_code>/V1/import/csv for CSV payloads
  • POST /rest/<store_code>/V1/import/json for JSON payloads

Both accept a base64-encoded string in the request body. For CSV, the rule is: UTF-8 encode your file, gzip-compress it (optional but smart for anything over 1MB), then base64 the result. Response returns a count of entities imported. Async bulk via /V1/bulk/ works too if you want fire-and-forget.

The flow, en ordre:

  • Authenticate with an admin token (POST to /V1/integration/admin/token)
  • Gzip your products.csv, base64-encode it, stuff it into a JSON payload with la source, entity: “catalog_product”, et comportement: “append
  • POST to the import endpoint with the token in the Authorization header
  • Poll /V1/bulk/{bulkUuid}/statut if you went async

Adobe’s developer docs carry the exact payload shape and update per release, so pull from there rather than copying old StackOverflow threads. le 2.4.8 payoff: the async path doesn’t hold a PHP request open for up to 30 minutes the way the admin importer does. Your 50,000-row load runs in the background, and the storefront stays responsive to actual shoppers.

Common Import Errors and What Actually Fixes Them

These are the failures that burn the most time. Each one has a specific root cause that isn’t always obvious from the error text.

Allowed memory size of X bytes exhausted

PHP ran out of memory mid-import. Raise memory_limit in php.ini to 2G, restart PHP-FPM, retry. If you can’t touch php.ini (Hébergement partagé), split the CSV into files of 1,000-5,000 rows each and import sequentially. Third-party extensions like Firebear and Amasty add anImport without Memory Limittoggle, but that’s an extension feature, not native Magento.

Maximum execution time of 30 seconds exceeded

Your PHP max_execution_time est trop bas. Bump to 1800 secondes. On Nginx, you’ll also need to raise fastcgi_read_timeout to match, otherwise Nginx kills the upstream before PHP finishes.

Wrong columns sequence” ou “Header has invalid columns

Byte Order Mark. Your CSV was saved from Excel, which prepends a BOM to UTF-8 files that the importer reads as a garbled first column. Re-export from Google Sheets or re-save through Notepad++ as UTF-8 without BOM. If you only check one thing before hitting import, check this.

Invalid attribute set” ou “Invalid attribute value for X

Your CSV references an attribute set or dropdown value that doesn’t exist in this Magento install. Vérifier Stores > Attributes. Dropdown values are case-sensitive and whitespace-sensitive. “Redwith a trailing space is notRed”.

Importation “completesbut products don’t appear on frontend

Reindex didn’t run, or cache is stale. SSH in and run bin/magento indexer:reindex suivie par bin/magento cache:flush. Sur 2.4.8 with Update by Schedule indexers this is rarer, but still happens with product-URL and stock indexers.

URL key for specified store already exists

You’re importing a product whose url_key collides with an existing one. Either change the URL key in your CSV or set behavior toAdd/Updaterather than a freshAppend Complex Data” courir.

Hosting Requirements for Big Imports

Shared hosting kills more Magento imports than bad CSVs do. If you’re running a production 2.4.8 boutique, the honest floor is 4 Go de RAM et 2-4 vCPU; real catalogs (10k+ SKUs, frequent reimports) besoin 8-16 GB. Disk should be NVMe SSD, not spinning drives or old SATA SSDs, because reindex and image-resize ops hammer random I/O.

Specific things a Magento-ready host should let you do:

  • Edit php.ini (or per-domain equivalent) to raise memory_limit and execution time
  • Install and run cron (Magento’s async bulk import uses the consumers queue)
  • SSH access for bin/magento CLI commands
  • Enough disk headroom that var/import/images can hold your largest batch twice over (Magento copies, not moves)

If your current host can’t deliver those, the importer isn’t your real problem. Notre Magento VPS hosting roundup breaks down which providers ship a 2.4.8-ready stack without surcharges, et le outil de recherche d'hébergement filters by PHP version, RAM, and control panel if you want to compare plans side by side. For merchants running WooCommerce alongside Magento (it happens more than you’d think), le Guide d'hébergement de commerce électronique WordPress covers the crossover stack.

Questions fréquemment posées

What’s the maximum CSV file size I can import in Magento 2.4.8?

The admin importer caps uploads at 2MB by default, controlled by PHP’s upload_max_filesize et post_max_size. Raise both to 64M in php.ini for larger files. For anything past 50MB compressed, switch to the REST /V1/import/csv endpoint, which handles gzip’d payloads and doesn’t bottleneck on browser upload.

Can I import products in Magento 2 without using CSV?

Oui. Magento 2.4.8’s REST API accepts both CSV and JSON via /V1/import/json. Third-party extensions (Firebear, Amastie, Magmi for older installs) support XML, Google Sheets sync, and direct ERP connectors. Native admin still requires CSV, so pick your path based on automation needs.

How long does a 10,000-product import take?

On a tuned 2.4.8 empiler (8 Go de RAM, NVMe, PHP 8.4, MariaDB 11.4), attendre 15-25 minutes for a 10k-row import with images. Shared hosting pushes this to 60+ minutes if it completes at all. The async REST bulk path runs in the background, so shopper-facing pages stay responsive during the import.

Why does my import succeed but show wrong prices or stock?

Deux causes habituelles. Première, your CSV has trailing whitespace or European comma-decimal formatting (1,99 au lieu de 1.99) in the price column; Magento parses these as invalid and keeps the old value. Deuxième, inventaire multi-sources (MSI) dans 2.4.8 stores qty per source, not per product globally, so you need the source_code column or the import updates the default source only.

Do I need to disable Magento flat catalog before importing?

Flat catalog was deprecated in 2.3 and removed from default workflows by 2.4.5. If your store somehow still has it enabled, disable it under Stores > Configuration > Catalogue > Vitrine before large imports. It was always a performance liability and 2.4.8 makes this explicit in the admin.

Can I automate product imports from an ERP or PIM?

That’s exactly what the 2.4.8 REST endpoints are for. Tools like Akeneo, Pimcore, and Salsify have native Magento 2 connectors. For custom builds, cron a script that pulls your ERP feed, transforms to CSV, gzips, and POSTs to /V1/import/csv. Schedule for off-peak hours if the import is heavy.

Final Notes

Two rules decide whether your next import works. Un: save the CSV as UTF-8 without BOM. Toujours. Two: raise PHP memory_limit et max_execution_time avant de commencer, not after the first crash. Everything else is detail.

Path-wise, the call is simple. Sous 5,000 SKUs and running imports occasionally? Use the admin CSV tool. Past 10,000 SKUs or syncing from an ERP nightly? Use the REST /V1/import/csv endpoint added in 2.4.8 and stop babysitting the process. Back up the database before any Replace or Delete run. Never close the browser tab mid-import. And if the stack underneath can’t hold up, no importer tactic rescues it. Fix the host first.

Pour une lecture connexe: le Magento theme roundup covers frontend performance after your catalog is loaded, the speed playbook linked above handles the caching stack, and the hosting guides cover what to run it all on. The boring infrastructure choices compound faster than any single feature flag.

Recherche et rédaction par:
Éditeurs HowToHosting
HowToHosting.guide fournit une expertise et un aperçu du processus de création de blogs et de sites Web, trouver le bon hébergeur, et tout ce qui se trouve entre les deux. En savoir plus...

1 Commentaire

  1. Katie

    Un guide optimal, Je vous facilite également l'utilisation de Feed Manager pour uniformiser la liste de vos invités et fournisseurs.. Connecté à mon tornade très utile pour gérer et produire des produits de manière massive, voici le destin d'utiliser d'autres gestionnaires de flux? Profitez de l'expérience avec l'utilisation de ces instruments?

    (FR Verson) Excellent guide, Personnellement, j'utilise également Feed Manager pour uniformiser les listes de prix que les fournisseurs m'envoient.. Connecteed m'est très utile pour gérer des produits en vrac, utilisez-vous d'autres gestionnaires de flux? Avez-vous de l'expérience avec l'utilisation de ces outils?

    Répondre

Laisser un commentaire

Votre adresse email ne sera pas publiée. les champs requis sont indiqués *

Ce site utilise des cookies pour améliorer l'expérience utilisateur. En utilisant notre site Web, vous consentez à tous les cookies conformément à notre Politique de confidentialité.
Je suis d'accord
Sur HowToHosting.Guide, nous proposons des avis transparents sur l'hébergement Web, garantir l’indépendance vis-à-vis des influences extérieures. Nos évaluations sont impartiales car nous appliquons des normes strictes et cohérentes à tous les avis..
Bien que nous puissions gagner des commissions d'affiliation de certaines des sociétés présentées, ces commissions ne compromettent pas l'intégrité de nos avis et n'influencent pas notre classement.
Les revenus de l'affilié contribuent à couvrir l'acquisition du compte, frais de tests, entretien, et développement de notre site Web et de nos systèmes internes.
Faites confiance à howtohosting.guide pour des informations fiables et une sincérité en matière d'hébergement.