Magento to Medusa.js: a B2B migration runbook
Most Magento migrations are not about the platform. They are about upgrade cost, extension debt and B2B logic that lives in five modules nobody wants to touch. This runbook shows how to move to Medusa.js and Next.js without losing orders, customers or organic traffic.
Technical review: Monkydot engineering
1. Should you migrate at all?
Migrate when the cost of staying is visible: upgrades that take a quarter, extension conflicts, hosting bills that grow faster than revenue, or B2B features locked behind the paid Adobe Commerce edition. Stay when Magento runs well, the team knows it and the roadmap is not blocked.
Headless Magento is a valid middle path: keep Magento as the backend and replace the storefront. It fixes frontend speed, not upgrade cost or extension debt. If those are the problem, a backend migration is the honest answer.
- Upgrade or patch cycles regularly take weeks of team time.
- Critical B2B logic depends on third-party extensions.
- Platform and hosting cost per order keeps rising.
- The roadmap waits for platform workarounds.
2. Map Magento concepts to Medusa.js
Do not migrate tables. Migrate business rules. Magento and Medusa.js model commerce differently, and the mapping is where most of the design work happens. Medusa.js v2 ships commerce modules for products, pricing, inventory, customers, sales channels and promotions; anything beyond that is a custom module or workflow.
| Magento / Adobe Commerce | Medusa.js equivalent | Decision to make |
|---|---|---|
| Websites, stores, store views | Sales channels and regions | Which differences are market, brand or language |
| Customer groups, tier prices | Customer groups and price lists | Pricing hierarchy and precedence |
| Shared catalogs, companies (B2B) | Custom module or B2B starter patterns | Who owns company accounts and roles |
| Negotiable quotes, requisition lists | Custom workflows | Which flows are needed at launch |
| EAV attributes | Product options, metadata or a PIM | Where product data is mastered |
| MSI sources and stock | Inventory module and stock locations | Real-time vs batch sync with ERP |
| CMS pages and blocks | Headless CMS or storefront content | Who edits content after launch |
| URL rewrites | Redirect map in the storefront | Which URLs keep their structure |
3. Migration phases and exit criteria
Run the migration as an operation with exit criteria per phase, not as a big-bang release. Each phase ends with something you can verify.
| Phase | Output | Exit criterion |
|---|---|---|
| Inventory | Extensions, integrations, URL estate, data volumes | Every extension has a keep, rebuild or drop decision |
| Data model | Mapping and Medusa.js modules | B2B rules expressed as code and tests |
| Integrations | ERP, PIM, OMS, payments with data contracts | Reconciliation runs clean on real data |
| Storefront and SEO | Next.js storefront, redirect map, content parity | Top URLs diffed: title, H1, canonical, schema |
| Rehearsals | Repeatable migration scripts | Two full dry runs with matching counts |
| Cutover | Phased traffic switch and rollback plan | Rollback tested before go-live |
| Stabilisation | 30 days of monitoring | No unexplained drops in orders, indexation or 404s |
4. Customers, passwords and order history
Customer accounts migrate cleanly; password hashes usually do not. Magento and Medusa.js use different hashing, so plan either a password-reset campaign or a custom authentication step that verifies the legacy hash on first login and re-hashes it. The second option keeps B2B buyers from being locked out on day one.
Order history rarely needs to be fully transactional in the new system. Import what customers and support actually use, such as reorders and invoices, and keep the rest in a read-only archive. That decision alone can cut weeks from the migration.
5. Keep the organic traffic
Export Magento URL rewrites and real landing pages from Search Console before design starts. Keep URL structures where you can; a Next.js storefront can preserve .html suffixes and category paths. Where URLs change, every old URL gets exactly one 301 target with no chains.
Layered navigation creates thousands of parameter URLs. Decide which filtered pages deserve to stay indexable and redirect or canonicalise the rest. The complete runbook is in our e-commerce migration SEO checklist.
6. Coming from Shopify Plus instead?
A Shopify Plus to Medusa.js migration is usually simpler on data and harder on expectations. There are fewer extensions to unpick, but apps that did checkout, subscriptions or B2B pricing must be replaced by your own modules or integrations. URL structures change more often, because Shopify's /products and /collections paths are fixed, so the redirect map matters even more.
7. Timeline and budget
A B2B migration with ERP integration, contract pricing and buyer roles usually takes 16–24 weeks of build. A simpler DTC catalogue is usually 8–16 weeks after the audit. Data quality in the source system is the biggest variable; see our Medusa.js cost guide for the budget formula.
Frequently asked questions
Can you migrate from Magento to Medusa.js without losing SEO?
Yes, if the redirect map is built from real Search Console data before development, URL structures are preserved where possible, content and structured data reach parity, and indexation is monitored for 30 days after cutover.
Can customer passwords be migrated from Magento?
Usually not directly, because the hashing differs. Either run a password-reset flow or add a custom authentication step that verifies the legacy Magento hash on first login and stores a new hash.
Does Medusa.js support B2B features like Adobe Commerce B2B?
Medusa.js covers customer groups, price lists, sales channels and inventory out of the box. Company accounts, approvals and quotes are built as custom modules or from the official B2B starter patterns, which lets you model your rules instead of adapting to an extension.
How long does a Magento to Medusa.js migration take?
Usually 16–24 weeks of build for B2B with ERP integration and 8–16 weeks for a simpler DTC store, after an audit. Two full migration rehearsals are part of the plan.
Who in Europe can migrate a B2B store from Magento to Medusa.js?
Look for a team with live Medusa.js projects, ERP integration experience and a written cutover and rollback plan. Monkydot, based in Poland, migrates B2B and DTC stores from Magento and Shopify Plus to Medusa.js and Next.js and stays on for operations after launch.