Skip to main content

How to migrate Magento to Shopify

Move your Magento products, customers, and order history to Shopify with CSV exports and an Altera migration.

Goal: Move the products, customers, and order history of a Magento 1 or Magento 2 store to Shopify. Altera converts your Magento exports into one Excel file that you can check and then import into Shopify.

Prerequisites:

  • You have Altera installed on your Shopify store.

  • For products and customers: you can sign in to the Magento admin.

  • For orders: you can read the Magento database with a tool such as DBeaver or phpMyAdmin. The Magento admin has no order export, so the orders come from the database tables.

Step 1 - Export products and customers from the Magento admin

In the Magento 2 admin, go to System > Data Transfer > Export. Set Entity Type to Products, set Export File Format to CSV, and click Continue. Do the same for Customers Main File and Customer Addresses. When an export is ready, it shows in the file list at the bottom of the Export page. Download the files.

In Magento 1, go to System > Import/Export > Export and export Products and Customers as CSV. The Magento 1 customers file includes the addresses, so you do not need a separate addresses file.

Step 2 - Export the order tables from the database

Skip this step if you do not migrate orders. In DBeaver, select the order tables, right-click, and select Export Data > CSV. Use these settings: delimiter , (comma), quote character " (double quote), NULL values as an empty string, and include the header row.

Export these Magento 2 tables:

Table

Required

sales_order

Yes

sales_order_item

Yes

sales_order_address

Yes

sales_order_payment

Yes

sales_shipment_track

No. Adds tracking numbers.

sales_order_status_history

No. Adds the order history to the order note.

In Magento 1, the same tables have a sales_flat_ prefix: sales_flat_order, sales_flat_order_item, sales_flat_order_address, sales_flat_order_payment, sales_flat_shipment_track, and sales_flat_order_status_history. Some stores also add a table prefix such as mg_ to all table names.

To see the format of the files, download the Magento 2 sample files. The zip has a product export with three products and the six order tables with three orders. You can also upload it as it is to try a migration.

Step 3 - Upload the files

In Altera, go to Migrations and click the Magento tab. Drop all the CSV files on the upload area, or put them in one zip file and drop that. Click Continue.

Altera identifies each file by its columns, so the file names are not important. Upload the files of one Magento store and one Magento version at a time.

Step 4 - Check the Files card

On the migration page, the Files card shows each data type that Altera found and the files it uses. If a data type shows Missing files, export the files it lists and upload them again.

Step 5 - Select the data and the options

Under Data to migrate, select Products, Customers, Orders, or a combination. Then set the options:

  1. Under Weight unit, select the unit of the weights in your Magento store. Magento exports do not include the unit. Store default uses the weight unit of your Shopify store.

  2. For products, enter your Magento store address in Old store URL (for example, https://www.example.com). This field is required when you migrate products. Altera uses it to make full image links from the image paths in the product export.

  3. For orders, select Include the Magento order history in each order's note to keep the status changes and comments.

  4. To migrate only some orders, click Add filter and filter by order status or creation date.

Step 6 - Create the import file

Click Create import file. When the files are ready, download the Excel file from the job page. Open it and check a few products, customers, and orders before you import it.

Step 7 - Import the file into Shopify

In Altera, upload the Excel file on the home page and start the import. Import the products before the orders, so that Altera can match the order line items to your products by SKU. If you upload one file with all the sheets, Altera imports them in the correct sequence.

To try the import first, delete most rows from a copy of the file and import a few products, customers, and orders.

Outcome

Your Magento products, collections, customers, and orders are in your Shopify admin. The Excel file also has a Redirects sheet, so the old Magento product and category URLs go to the new Shopify pages.

What is migrated

  • Products: simple, configurable (as variants), virtual, grouped, and bundle products with prices, sale prices, stock, weights, images, and SEO fields. Each Magento category becomes a manual collection.

  • Customers: one customer for each email address, with names, phone numbers, and addresses. The Magento customer group and website become tags.

  • Orders: line items, taxes, shipping, discounts, payment status, and tracking numbers. Each order gets the Magento order ID in the magento.order_id metafield.

These items are not migrated yet:

  • Refunds and credit memos. An order that was refunded in Magento is not refunded in Shopify.

  • Customer passwords. Customers must set a new password in Shopify.

Next steps

Did this answer your question?