Skip to main content

How to Migrate from Shopify to Medusa 2026

·OSSAlt Team
shopifymedusamigratione-commerceguide
Share:

How to Migrate from Shopify to Medusa 2026

Shopify Basic costs $39/month plus 2.9% transaction fees on every order. At $50,000/month in revenue, Shopify takes $1,450 in fees alone — on top of the subscription. Medusa is the open source headless commerce platform: no transaction fees, developer-first architecture, full control over your stack. Here's how to migrate.

TL;DR

Export products, customers, and orders from Shopify as CSV files. Import products via Medusa's Admin API or bulk import script. Deploy a Next.js storefront using Medusa's starter. Set up Stripe for payments (same rate as Shopify's, minus Shopify's markup). The biggest investment is rebuilding your storefront — Medusa is headless and requires a frontend framework.

Key Takeaways

  • Medusa eliminates Shopify's 0.5-2% additional transaction fee on top of payment processor fees
  • Product and customer data migrates cleanly via CSV export/API import
  • Your Shopify theme doesn't transfer — Medusa is headless and needs a custom frontend
  • Shopify apps need replacement or custom development (shipping rates, tax, email, reviews)
  • Medusa v2 uses a modular architecture — install only what you need
  • Production deployment requires: Node.js server, PostgreSQL, Redis, and file storage

Why Teams Leave Shopify

Shopify's per-transaction fees are invisible when you start, but they become your biggest cost as revenue grows. The 2.9% Shopify payment fee is the same as Stripe's rate — except if you use an external payment processor, Shopify adds an additional 0.5-2% on top. A store processing $200,000/month pays $1,000-4,000/month in Shopify's markup alone.

Beyond fees, Shopify's platform is opinionated. The Liquid templating system, the app store dependency for extended features, and the limited API access make customization expensive. When you need something Shopify doesn't support natively — custom checkout flows, B2B pricing, multi-region tax handling — you're either buying an app subscription or building a workaround.

Medusa provides the commerce logic (cart, orders, inventory, payments, fulfillment) as a headless API. Your storefront is a separate Next.js, Nuxt, or Remix application that calls Medusa's REST API. You own everything, from the product catalog to the checkout flow to the data. See Medusa vs Saleor for a comparison of the two leading open source Shopify alternatives, or best open source alternatives to Shopify for the broader landscape.

What Transfers

Shopify DataMedusa Status
✅ ProductsExport CSV → import
✅ VariantsMapped to Medusa variants
✅ Categories/CollectionsRecreate as collections
✅ CustomersExport → import via API
✅ Orders (history)Export → import via API
⚠️ ImagesDownload + re-upload
❌ Theme/storefrontRebuild (headless)
❌ Apps/integrationsRebuild or find alternatives
❌ Shopify PaymentsUse Stripe directly
❌ Customer reviewsExport and re-import manually

Step 1: Deploy Medusa

# Create new Medusa project
npx create-medusa-app@latest my-store
cd my-store

# Start the server
npx medusa develop

Admin dashboard at localhost:9000/app, API at localhost:9000. For production, you need PostgreSQL and Redis:

# Set environment variables
MEDUSA_BACKEND_URL=https://api.yourdomain.com
DATABASE_URL=postgresql://user:pass@db:5432/medusa
REDIS_URL=redis://redis:6379
STORE_CORS=https://yourdomain.com
ADMIN_CORS=https://admin.yourdomain.com

Medusa runs as a Node.js application. Deploy to a VPS using PM2 or Docker, or use a cloud provider like Railway, Render, or Fly.io for managed hosting. For a production setup with high availability, containerize Medusa and run it behind a load balancer.

Step 2: Export from Shopify

Products:

  1. Shopify Admin → ProductsExport
  2. Choose CSV format, all products
  3. Include product images in the export

Customers:

  1. Shopify Admin → CustomersExport
  2. Download the customer CSV

Orders (for history):

  1. Shopify Admin → OrdersExport
  2. All time, CSV format

Images: Shopify's product image URLs in the CSV export expire. Download images directly from your Shopify CDN before they expire — write a script that fetches each image URL from the CSV and saves it locally.

Step 3: Import Products

// Script to import Shopify products into Medusa
const { Medusa } = require('@medusajs/js-sdk');
const csv = require('csv-parse/sync');
const fs = require('fs');

const medusa = new Medusa({ 
  baseUrl: 'http://localhost:9000',
  apiKey: 'your-api-key'
});

const products = csv.parse(fs.readFileSync('products.csv'), { columns: true });

// Group rows by Handle (Shopify uses multiple rows per product for variants)
const productMap = {};
for (const row of products) {
  if (!productMap[row.Handle]) {
    productMap[row.Handle] = { ...row, variants: [] };
  }
  productMap[row.Handle].variants.push({
    title: row['Variant Title'] || 'Default',
    prices: [{ 
      amount: Math.round(parseFloat(row['Variant Price']) * 100),
      currency_code: 'usd'
    }],
    sku: row['Variant SKU'],
    inventory_quantity: parseInt(row['Variant Inventory Qty']) || 0,
    weight: parseInt(row['Variant Grams']) || 0,
  });
}

for (const product of Object.values(productMap)) {
  await medusa.admin.products.create({
    title: product.Title,
    description: product['Body (HTML)'],
    handle: product.Handle,
    status: 'published',
    variants: product.variants,
    collection_id: null,  // link to collection separately
  });
}

Handle Shopify's multi-row variant format carefully. Each product appears multiple times in the CSV — once per variant. Group rows by the Handle column before importing.

Step 4: Import Customers

const customers = csv.parse(fs.readFileSync('customers.csv'), { columns: true });

for (const customer of customers) {
  await medusa.admin.customers.create({
    email: customer['Email'],
    first_name: customer['First Name'],
    last_name: customer['Last Name'],
    phone: customer['Phone'],
  });
}

Customer passwords cannot be migrated from Shopify. Customers will need to set new passwords on first login. Send a password reset email campaign before or shortly after launch to minimize support requests.

Step 5: Build Your Storefront

Medusa is headless — you need a frontend. This is the most significant investment in the migration.

Next.js Starter (fastest path to launch):

npx create-medusa-app@latest --with-nextjs-starter

The Next.js starter includes a product listing page, product detail page, cart, checkout, and account management. It's production-ready and connects to Medusa's API out of the box. Customize it with your brand's design.

Custom frontend: Use Medusa's JS SDK or REST API with any framework:

// Fetch products
import Medusa from "@medusajs/js-sdk";

const medusa = new Medusa({ baseUrl: "https://api.yourdomain.com" });
const { products } = await medusa.store.products.list();

// Fetch cart
const { cart } = await medusa.store.cart.retrieve(cartId);

// Add to cart
await medusa.store.cart.lineItems.create(cartId, {
  variant_id: variantId,
  quantity: 1,
});

Plan for 2-4 weeks of frontend development if building a custom storefront. The Next.js starter covers most standard e-commerce patterns and is the recommended starting point for most teams.

Step 6: Set Up Payments

# Install Stripe plugin
npm install @medusajs/payment-stripe

Configure in medusa-config.ts:

import { defineConfig } from '@medusajs/framework/utils';

export default defineConfig({
  modules: {
    payment: {
      resolve: "@medusajs/payment-stripe",
      options: {
        apiKey: process.env.STRIPE_API_KEY,
        webhookSecret: process.env.STRIPE_WEBHOOK_SECRET,
      },
    },
  },
});

No per-transaction fees from Medusa — only Stripe's standard 2.9% + $0.30. If you were using Shopify Payments (which is Stripe under the hood), you're saving the 0.5-2% Shopify surcharge on top.

Step 7: Replace Shopify Apps

Most Shopify apps need replacement when migrating to Medusa:

Shopify FeatureMedusa/Alternative
Shipping ratesMedusa fulfillment module
Tax calculationMedusa tax module (or TaxJar)
Order emailsMedusa notification module (SendGrid, Resend)
InventoryMedusa inventory module
Gift cardsMedusa gift card module
DiscountsMedusa discount module
Product reviewsMedusa (community plugin) or Directus
Email marketingListmonk or Mautic
AnalyticsPostHog or Umami

Medusa's modular architecture means you install only the modules you need. Basic order management, cart, inventory, and payments are included. Advanced features like B2B pricing tiers, multi-warehouse fulfillment, and regional tax handling are available as additional modules.

Cost Comparison (Annual)

ScenarioShopifyMedusa Self-Hosted
Startup ($10K/month revenue)$468/year + $3,480 fees$240/year hosting
Growing ($50K/month)$3,588/year + $17,400 fees$600/year hosting
Scale ($200K/month)$4,788/year + $69,600 fees$1,200/year hosting

Shopify fees = 2.9% + $0.30 per transaction via external payment provider. Medusa uses Stripe directly at the same rate with no additional platform fee.

Migration Timeline

WeekTask
Week 1-2Deploy Medusa, import products, start storefront build
Week 3Set up payments, shipping, tax, email
Week 4Import customers, test complete checkout flow
Month 2Soft launch with parallel run
Month 3Full cutover, cancel Shopify

What Headless Commerce Means for Your Team

Medusa separates the commerce backend (API server) from the storefront (your frontend application). This is headless commerce, and it has significant practical implications for your team.

On Shopify, the storefront is Shopify's hosted theme engine. Customization happens through Liquid templates and the theme editor — you are constrained to what Shopify allows. On Medusa, you build the storefront yourself using any framework you choose. This freedom is genuine — you can implement any UX pattern, rendering approach (SSR, SSG, ISR), or data-fetching strategy.

The Next.js starter that Medusa provides covers all core commerce flows: product listing pages, product detail pages, cart, checkout, order confirmation, account management, and order history. For most storefronts, starting with the official starter and customizing it is faster than building from scratch. Teams routinely go from starter to fully branded storefront in two to four weeks.

For teams without frontend experience, the headless model is the biggest challenge. Shopify's managed storefront handles browser compatibility, mobile responsiveness, and PCI DSS compliance on your behalf. With Medusa, those become your responsibility. The checkout must be PCI-compliant — Medusa handles this by delegating payment capture to your payment provider and never touching raw card data, but your frontend must implement this correctly using the payment provider's client SDK.

The benefit of the headless model becomes apparent at scale. Performance optimization, internationalization, and A/B testing are more tractable when you control the rendering stack. Enterprise teams report better Core Web Vitals and more conversion rate optimization capability on headless storefronts than on Shopify-constrained themes.

Medusa v1 vs v2: Use v2 for New Deployments

Medusa v2 is a significant architectural rewrite released in 2024. If you are starting a new Medusa deployment in 2026, use v2. The module system, API structure, and plugin ecosystem in v2 are substantially different from v1, and most new community development targets v2 exclusively.

The breaking changes between v1 and v2 affect API route structures, plugin installation patterns, and the event system. Do not mix v1 plugins with a v2 installation. If you find documentation referencing older Medusa patterns, verify whether they apply to v2 before following them.

For teams evaluating whether Medusa is the right choice at all, compare it against Saleor (GraphQL-native, strong EU community) before committing. The Medusa vs Saleor comparison covers the architectural differences in detail.

Common Pitfalls

Shopify variant limits: Shopify allows 3 option types and 100 variants per product. Medusa's v2 architecture has no hard limits, but your import script needs to handle Shopify's multi-row per product format correctly.

SEO continuity: Your Shopify store's product URLs follow the pattern /products/handle. Configure your Medusa storefront to use the same URL structure, and set up 301 redirects from the old Shopify domain. Google Search Console will need time to re-index the new URLs even with correct redirects.

Image CDN: Shopify hosts your product images on its CDN. After migration, you need your own image hosting — Cloudflare R2, AWS S3, or Supabase Storage are common choices. Medusa supports any S3-compatible storage provider for file uploads.

The Bottom Line

Migrating from Shopify to Medusa is a significant engineering investment — primarily the storefront rebuild. But for stores processing meaningful volume, the elimination of Shopify's transaction fee markup pays back that investment quickly. A store doing $100,000/month saves $500-2,000/month in fees alone, depending on their current Shopify plan and payment processor. The how to calculate ROI when switching to open source guide provides a structured framework to model this for your specific revenue volume and Shopify plan tier.

For teams hosting Medusa on their own infrastructure alongside other services, Coolify is a practical deployment platform — it handles deployments, environment variables, SSL, and previews for both the Medusa API and the Next.js storefront from a single interface. The Vercel to Coolify migration guide covers self-hosted deployment in detail, applicable to any Node.js application including Medusa.

Customer relationship management alongside the commerce platform is another area where open source alternatives offer strong value. The best open source CRM software guide covers tools that integrate with headless commerce platforms for customer lifecycle management beyond what Medusa's customer module handles natively.


Compare e-commerce platforms on OSSAlt — features, pricing, and flexibility side by side.

See open source alternatives to Shopify on OSSAlt.

The SaaS-to-Self-Hosted Migration Guide (Free PDF)

Step-by-step: infrastructure setup, data migration, backups, and security for 15+ common SaaS replacements. Used by 300+ developers.

Join 300+ self-hosters. Unsubscribe in one click.