How To Migrate WooCommerce Customers and Orders (Like A Pro!)

How to move customers and orders from one WooCommerce site to another?

In this guide, you will learn how to successfully migrate WooCommerce customers and orders between sites without having to change the customer’s password or over writing existing orders and post IDs.

Whether you need to move a few or thousands of WooCommerce customers and orders between sites, you are in good hands!

Remember to stay patient, take backups, and practice on a separate staging site if need be.

Quick Tip: I put together a nice and handy checklist that you can download as a PDF and even print off to help during this process!

How to migrate WooCommerce customers and orders?

  1. Export Customers from Site A
  2. Import Customers to Site B
  3. Export Orders from Site A
  4. Import Orders to Site B
  5. FAQs
  6. Video Tutorial

Make sure to migrate your customers before migrating your orders.

How come?

Each order is mapped to a single customer. If the customer has not been migrated yet, the order cannot map to that customer.

This is especially important if you are merging customers and orders between sites and you want your customers to keep their same password.

What plugins do I need to do this? Below are the following plugins to use in your migration:

Yes, I know these are paid plugins. I tried a lot of free and other paid plugins and was not able to successfully migrate my orders without the two plugins above.

Not only will these plugins save you a lot of time and headaches in the migration process, but will also ensure that your customers and orders are moved correctly.

Let’s begin!

1. Export Customers from Site A

Step 1

First, go to Site A and upload and activate the Customer / Order CSV Export plugin. This is going to let you generate a CSV file of all of your WooCommerce customers.

Do not skip this step. You have to export/import your customers before you export/import your orders or else they will not be mapped together.

Step 2

Next, on your WordPress dashboard, hover over WooCommerce and click “CSV Export”.

woocommerce-migrate-customers-csv-export-settings

Step 3

Then, go to Settings, toggle Customers, and select the dropdown to CSV Import and click “Save Settings”.

woocommerce-export-customers-csv-import-save-settings

Step 4

Finally, go to CSV Export file tab, toggle Customers and click “Export”.

When the export is completed, navigate to the “Export list” tab, and download your CSV file.

My exports freeze without completing. How do I fix this? If you exports freeze without completing, ensure that your site is not blocking HTTP requests.

Before proceeding to part 2, do a quick check of your customers CSV file.

The first 3 column headers should be username, email, and password.

Correct

✅ username
✅ email
✅ password

Incorrect

❌ customer_id
❌ first_name
❌ last_name

woocommerce-export-customers-csv-file-username-email-password
This is how the first 3 columns of your customers CSV file should look like

Here is a sample CSV format file if you want to be certain you are following the directions: sample customers csv import. If you want to, you can then convert this file to another format such as XLS, which is the native Excel format, or even Google Sheets for sharing with colleagues.

If your CSV file is correct get ready to import your customers from Site A to Site B in part 2!

2. Import Customers from Site A to Site B

Step 1

First, go Site B and upload and activate the Customer / Order / Coupon CSV Import Suite plugin. We’ll be using this plugin import our customers to the new site. You also will be using this to import your orders later on!

Step 2

Next, on your WordPress dashboard hover over WooCommerce > click “CSV Import Suite”.

Step 3

Then, click “Import Customers”, upload your customers CSV file, and click “Import”.

woocommerce-import-customers-csv

Step 4

Finally, toggle settings based on the customers you import and click “Next”. This lets you deal with custom fields and make sure that when it comes to it your order data is moved corectly.

For example, if a customer does not have a shipping address set, I toggle to use their billing address. In addition, since we exported the customers using the CSV Import format in Part 1, the user passwords are correctly hashed and do not need to be re-hashed.

If you are importing customers that could be on Site B already, make sure to check Merge/update.

Pro Tip: the first 3 columns of your CSV file should be username, email, and password. If they’re not, reorder the columns before uploading!

After confirming your mapping is setup correctly, scroll down and click “Dry Run”.

import-customers-dry-run

Running as a “Dry Run” will allow you to see how the data is interpreted before running the import.

If you make a mistake, you can always restore to the previous backup point.

When everything is ready to go, click “Run a live import now”.

import-woocommerce-customers-run-live-import

Congrats! You have migrated your customers from Site A to Site B.

In part 3, we will be exporting your orders from Site A.

3. Export Orders from Site A

Before exporting your orders from Site A, ensure that the SKUs on each product (and product variation if any) on Site A match the products on Site B.

Step 1

First, go back to Site A. On your WordPress dashboard, hover over WooCommerce and click “CSV Export”. We’re going to use this to export the orders and ensure your order details all move correctly.

Are you only importing/exporting WooCommerce orders? If you have not done so already, the first step is to purchase, download and activate the Customer / Order CSV Export plugin on Site A.

Step 2

Next, go to the Settings tab, toggle Orders, and select the dropdown to “CSV Import” and click “Save Settings”.

img-moving-orders-in-woocommerce
Set the Order Export Format to “CSV Import”

Step 3

Then, click the “Export” tab, ensure the export is toggled to Orders and click the Export button.

img-moving-orders-in-woocommerce-2
Keep all default statuses unless you have a specific periods or order statuses you are looking to export.

Step 4

Finally, when the export is done, click the “Export list” tab and download the exported Orders CSV file. One of the benefits of using WooCommerce as your eCommerce platform is bulk actions like this can be completed with fully compatibility straight from the WordPress Dashboard, with no need for developer tools like FTP!

woocommerce-export-orders-download-csv-file
click the “Export list” tab and download the exported Orders CSV file

In part 4, we will be importing orders from Site A into Site B.

4. Import Orders from Site A to Site B

Before importing your orders, I would highly recommend taking a backup of Site B!

In addition, download and activate the Disable Emails free plugin. This plugin stops emails from sending on your WordPress server. This is beneficial when you import the orders to Site B as it blocks email notifications to send to your customers. I have made this mistake by not utilizing this plugin and sent over 5,000 order notification emails to past customers from orders 5 years ago!

Are you only importing/exporting WooCommerce orders? If you have not done so already, purchase, download and activate the Customer / Order CSV Import Suite plugin on Site B.

Step 1

First, navigate to Site B and on your WordPress dashboard hover over WooCommerce, click “CSV Import Suite”.

woocommerce-migrate-customers-csv-import-suite-settings

Then click “Import Orders”.

woocommerce-import-orders-between-sites

Step 2

Next, upload your Orders CSV file, click “Next” and configure the options.

import-woo-orders-options

When finished, click “Next”.

woocommerce-import-orders-settings

Pro Tip: If your product SKUs have changed and want to import products with an updated SKU, open up your Orders CSV file, and run a search and replace on the product SKUs line items that have been updated before importing your orders.

Step 3

Then, make sure your Orders CSV file is mapped properly.

Even if you’re not merging orders, skip the first column “id” in the file mapping.

import-orders-file-mapping-skip-order-id

The first 3 columns imported should be:

  1. id
  2. order_number
  3. order_number_formatted
  4. created_at

When finished, click “Next”.

Step 4

Finally, click run as a “Dry Run” and if everything went smoothly, click “Run a live import now”.

Congratulations! You have migrated your orders and customers from Site A to Site B!

Pro Tip: make sure to deactivate the Disable Emails plugin after completing the migration process. You want new orders to be able to receive email confirmations!

Frequently Asked Questions

Can I migrate one customer and one order before migrating everything at once?

Yes! A good way to minimize any trouble in migration is to export one customer, import one customer, export one order (belonging to that customer), and then importing that order. If everything went well during the single customer migration, I then migrate all customers and orders.

Single order import
If I have 10 or 100,000 orders to import, I always import a single order to minimize any trouble in migration.

Note: after the single order has been imported, navigate to WooCommerce > Orders > and study the single order to ensure everything migrated correctly.

All orders import
If the single order import went well, repeat the steps above and import all orders into your site.

How do I keep my WooCommerce order numbers the same when migrating sites?

If you want your migrated orders to keep the same order number for each order, download the Sequential Order Numbers Pro plugin (paid) plugin on Site A before exporting your Orders and Site B before importing your Orders.

Every post on a WordPress site has a unique, auto-incremented post ID. This is also why your order numbers are not sequential by default: the order number typically equals order ID; this ID is pulling from a counter that’s also incremented each time a product, blog post, page, or other content is added.

woocommerce-sequential-order-numbers-plugin
Download the Sequential Order Numbers plugin on Site A and Site B.

Ensure the first and second columns are order_number and order_number_formatted and NOT IMPORTING the “id” column since this will be auto-incremented when importing to Site B.

How do I migrate orders for “guest” customers?

To export/import customers who created orders as a guest user, ensure the following 3 things are occurring in your customer and order CSV files:

1) Customers CSV file: if a guest customer, leave the “username” and “password” field blank. By default, if “username” is not provided, the order will be marked as a guest purchase.

woocommerce-migrate-guest-customers
Leave the “username” and “password” fields blank for Guest customers.

2) Orders CSV file: if a guest customer, leave the “customer_user” field blank.

Leave the “customer_user” field blank for Guest customers.

3) In WooCommerce > Settings > Accounts & Privacy, ensure that “Allow customers to place orders without an account” is checked.

woocommerce-migrate-guest-customers
Check to “Allow customers to place orders without an account”

What plugins do I need to Migrate WooCommerce Orders & Orders?

Below are the following plugins to use in your migration:

Yes, I know these are paid plugins but I tried a lot of free and other paid plugins and was not able to successfully migrate my orders without the two plugins above.

Not only will these plugins save you a lot of time and headaches in the migration process, but will also ensure that your customers and orders are moved correctly.

How can I reformat my CSV file before importing my orders into Site B (Step 4)?

For example, you may want to update the status column of your Orders CSV file before importing. These orders may now have the orders status completed but previously were processing or on-hold. If any orders need to be updated from “on-hold” to “completed” or from “processing” to “completed”, do the following:

  1. Highlight Column D > click Edit > click Find and Replace.
  2. Find “on-hold”, replace all to “completed”.
  3. Find “processing”, replace all to “completed”.

After your CSV file is ready to go, go to File > Download As > Comma-separated values (.csv, current sheet).

Can I start the order numbers at a particular number, like 725? If so, how do I do that?

Yes, the Sequential Order Numbers Pro (paid) allows you to choose any starting number that’s higher than your most current order number.

To do this, go navigate to your WordPress Dashboard and then go to WooCommerce > Settings > General and scroll down to “Order Numbers” to set the Order Number Start.

My starting order number is not working. What could be the problem?

If your site already has existing orders, you must use a starting number which is greater than the biggest existing order number. For example, if the site has the following order numbers: 1, 2, 10, 125, 508, the only eligible starting order numbers are 509 and above. Note, this is done so that historical order numbers are not altered.

How do I migrate WooCommerce Subscriptions?

The Customer / Order CSV Export plugin downloaded in Step 1 of this tutorial will export all “regular” orders as well as parent and renewal orders of “Subscriptions”.

However, the CSV Export plugin will not export the “Subscriptions”. For example, after migrating your orders, your Subscriptions tab will be empty, even though you imported subscription parent and renewal orders.

migrating-woocommerce-subscriptions-blank

To migrate Subscriptions (not parent or renewal orders associated with each subscription), I recommend using the WooCommerce Subscriptions Importer/Exporter extension.

My exports freeze without completing. How do I fix this?

If you exports freeze without completing, ensure that your site is not blocking HTTP requests. For example, if you are on a staging site and users have to enter a username and password before entering the site, disable this on your staging site server to allow exports to process.

woocommerce-customers-orders-csv-export-freeze

How long will it take for my customers or customers to export or import to the list?

This can anywhere from 5 seconds to 30-45 minutes depending on how many customers and orders you are exporting or importing.

How come you wouldn’t just copy the live site to the dev site? Wouldn’t all orders be migrated?

If you are developing an entirely new theme I prefer to start with a fresh WordPress install, develop the theme, and then re-import the products, customers, coupons, and then orders.

How to setup Sequential Order Numbers in WooCommerce?

I will be launching my new site (Site B) before I will be able to migrate all of my historical orders from Site A. I was able to migrate half of my historical orders from Site A. What should be my starting custom order number on Site B when I launch my site?

Example 1: I have 500 historical orders on Site A. I will not be able to migrate my 500 historical orders from my staging site (Site A) before I launch my new site (Site B). However, I was able to migrate 250 of the 500 orders from Site A to Site B.

Site A (Historical Orders): Min Order – Max Order

  • Starting Order #: 1001
  • Ending Order #: 1500

Example 1 Solution Steps

  1. Site A: Export the following order #s from Site A: 1001 – 1250
  2. Site B: Import the following orders #s to Site B: 1001 – 1250
  3. Site B: Set the Custom Starting Order Number to the following: 1501 and higher (Remember, you’re able to choose any starting number that’s higher than your most current order number)
  4. Site B: Launch Site B
  5. Site A: Export the following order #s from Site A: 1251 – 1500
  6. Site B: Import the following orders #s to Site B: 1251 – 1500
  7. Site B: Do 3 test orders on the live site.
  8. Site B: Confirm the 3 test orders had the following order numbers: 1501, 1502, 1503

Example 2: I will not be able to migrate my 503 historical orders from my staging site (Site A) before I launch my new site (Site B). However, I was able to migrate 250 of the 503 orders from Site A to Site B.

Site A (Historical Orders): Min Order – Max Order

  • Starting Order #: 1001
  • Ending Order #: 1500
  • Other Order #s: 1871, 1923, 2384

Example 2A Solution Steps

  1. Site A: Export the following order #s from Site A: 1001 – 1250
  2. Site B: Import the following orders #s to Site B: 1001 – 1250
  3. Site B: Set the Custom Starting Order Number to the following: 2385 and higher (Remember, you’re able to choose any starting number that’s higher than your most current order number)
  4. Site B: Launch Site B
  5. Site A: Export the following order #s from Site A: 1251 – 1500, 1871, 1923, 2384
  6. Site B: Import the following orders #s to Site B: 1251 – 1500, 1871, 1923, 2384
  7. Site B: Do 3 test orders on the live site.
  8. Site B: Confirm the 3 test orders had the following order numbers: 2385, 2386, 2387

Example 2B Solution Steps: (Rename outlier order numbers > “1871 to “”1501”)

  1. Site A: Export the following order #s from Site A: 1001 – 1250
  2. Site B: Import the following orders #s to Site B: 1001 – 1250
  3. Site B: Set the Custom Starting Order Number to the following: 1504 and higher (Remember, you’re able to choose any starting number that’s higher than your most current order number)
  4. Site B: Launch Site B
  5. Site A: Export the following order #s from Site A: 1251 – 1500
  6. Site B: Import the following orders #s to Site B: 1251 – 1500
  7. Site A: Export the following order #s from Site A (1871, 1923, 2384) into a CSV file. Then upload the csv file into Google Drive and rename the orders to the following:
    • “1871” to “1501”
    • “1923” to “1502”
    • “2384” to “1502”
  8. Site B: Import the following orders #s to Site B: 1501, 1502, 1503
  9. Site B: Do 3 test orders on the live site.
  10. Site B: Confirm the 3 test orders had the following order numbers: 1504, 1505, 1506

Example 2C Solution Steps: (Insert Prefix before outlier order numbers > “1871 to “”WC-1871”)

  1. Site A: Export the following order #s from Site A: 1001 – 1250
  2. Site B: Import the following orders #s to Site B: 1001 – 1250
  3. Site B: Set the Custom Starting Order Number to the following: 1501 and higher (Remember, you’re able to choose any starting number that’s higher than your most current order number)
  4. Site B: Launch Site B
  5. Site A: Export the following order #s from Site A: 1251 – 1500
  6. Site B: Import the following orders #s to Site B: 1251 – 1500
  7. Site A: Export the following order #s from Site A (1871, 1923, 2384) into a CSV file. Then upload the csv file into Google Drive and rename the orders to the following:
    • “1871” to “WC-1871”
    • “1923” to “WC-1923”
    • “2384” to “WC-2384”
  8. Site B: Import the following orders #s to Site B: WC-1871, WC-1923, WC-2384
  9. Site B: Do 3 test orders on the live site.
  10. Site B: Confirm the 3 test orders had the following order numbers: 1501, 1502, 1503

I will be launching my new site (Site B) before I will be able to migrate my historical orders from Site A. What should be my starting custom order number on Site B when I launch my site?

Example 1: I have 500 historical orders on Site A. I will not be able to migrate my 500 historical orders from my staging site (Site A) before I launch my new site (Site B).

Site A (Historical Orders): Min Order – Max Order

  • Starting Order #: 1001
  • Ending Order #: 1500

Example 1 Solution Steps

  1. Site B: Set the Custom Starting Order Number to the following: 1501 and higher (Remember, you’re able to choose any starting number that’s higher than your most current order number)
  2. Site B: Launch Site B
  3. Site A: Export the following order #s from Site A: 1001 – 1500
  4. Site B: Import the following orders #s to Site B: 1001 – 1500
  5. Site B: Do 3 test orders on the live site.
  6. Site B: Confirm the 3 test orders had the following order numbers: 1501, 1502, 1503

 

Example 2: I have 503 historical orders on Site A. I will not be able to migrate my 503 historical orders from my staging site (Site A) before I launch my new site (Site B).

Site A (Historical Orders): Min Order – Max Order

  • Starting Order #: 1001
  • Ending Order #: 1500
  • Other Order #s: 1871, 1923, 2384

Example 2A Solution Steps:

  1. Site B: Set the Custom Starting Order Number to the following: 2385 and higher (Remember, you’re able to choose any starting number that’s higher than your most current order number)
  2. Site B: Launch Site B
  3. Site A: Export the following order #s from Site A: 1001 – 1500, 1871, 1923, 2384
  4. Site B: Import the following orders #s to Site B: 1001 – 1500, 1871, 1923, 2384
  5. Site B: Do 3 test orders on the live site.
  6. Site B: Confirm the 3 test orders had the following order numbers: 2385, 2386, 2387

Example 2B Solution Steps: (Rename outlier order numbers > “1871 to “”1501”)

  1. Site B: Set the Custom Starting Order Number to the following: 1504 and higher (Remember, you’re able to choose any starting number that’s higher than your most current order number)
  2. Site B: Launch Site B
  3. Site A: Export the following order #s from Site A: 1001 – 1500
  4. Site B: Import the following orders #s to Site B: 1001 – 1500
  5. Site A: Export the following order #s from Site A (1871, 1923, 2384) into a CSV file. Then upload the csv file into Google Drive and rename the orders to the following:
    • “1871” to “1501”
    • “1923” to “1502”
    • “2384” to “1502”
  6. Site B: Import the following orders #s to Site B: 1501, 1502, 1503
  7. Site B: Do 3 test orders on the live site.
  8. Site B: Confirm the 3 test orders had the following order numbers: 1504, 1505, 1506

Example 2C Solution Steps: (Insert Prefix before outlier order numbers > “1871 to “”WC-1871”)

  1. Site B: Set the Custom Starting Order Number to the following: 1501 and higher (Remember, you’re able to choose any starting number that’s higher than your most current order number)
  2. Site B: Launch Site B
  3. Site A: Export the following order #s from Site A: 1001 – 1500
  4. Site B: Import the following orders #s to Site B: 1001 – 1500
  5. Site A: Export the following order #s from Site A (1871, 1923, 2384) into a CSV file. Then upload the csv file into Google Drive and rename the orders to the following:
    • “1871” to “WC-1871”
    • “1923” to “WC-1923”
    • “2384” to “WC-2384”
  6. Site B: Import the following orders #s to Site B: WC-1871, WC-1923, WC-2384
  7. Site B: Do 3 test orders on the live site.
  8. Site B: Confirm the 3 test orders had the following order numbers: 1501, 1502, 1503

What will happen when I activate the Sequential Order Number plugin on my site? What will change?

Once you activate the Sequential Order Number plugin on your site, any new orders will immediately and automatically start becoming sequential, starting from the most recent order number.

What if I have changed my product names, but I want the previous orders to show. How can I do this?

If the product names are changed that is okay! Order items are mapped to existing products via SKU or product_id. I would recommend using SKU to match the products between sites if you changed the product names. For example, if you have a Green Sweatshirt with SKU “SWEATSHIRT-GREEN” on site A but the product is named Classic Green Sweatshirt on site B, make sure the SKU is also “SWEATSHIRT-GREEN” on site B.

Do you have a tutorial on how to Migrate Shopify Orders & Customers to WooCommerce?

Yes, please see this blog post here: How to Migrate Shopify Customers and Orders to WooCommerce.

I do not use a premium managed WordPress host. How can I easily create a backup with a plugin?

A few plugins to use are BlogVault, BackupBuddy, or Updraft Plus. If you are looking for a high quality WooCommerce hosting provider I do highly recommend Kinsta or WP Engine. Kinsta is my preferred choice to host my WordPress and WooCommerce sites. They offer free migrations from any host! A downside is that they are slightly more expensive than WP Engine but IMHO well worth it!

Video Tutorials

I made a few video tutorials of how to do this if you are more of a visual learner. I understand the videos are long but migrating customers and orders is a tedious task. See the videos below:

Migrate Customers and Orders (example #1)

Migrate Customers and Orders (example #2)

How to manually add (or edit) a Subscription in WooCommerce?

Additional Resources

Simon Gondeck

I’m a big fan of WordPress + WooCommerce (especially WooCommerce Subscriptions). Check out my YouTube channel.

65 thoughts on “How To Migrate WooCommerce Customers and Orders (Like A Pro!)”

  1. Hi Simon,

    Great tutorial and article. Very helpful indeed!

    Just a couple of things. I need to export the customer accounts and orders from site A to the new site B which is on its own hosting account. Would it work to create a staging site for the original website (site A) install the SEQUENTIAL ORDERS NUMBER PLUGIN to the staging site and export the customer information and orders from the staging site? It should have all the same customer accounts and orders right?

    And secondly after I have exported the customer accounts and the orders and imported them into the new website following your guide how can I check that everything has been done 100% correctly?

    Many thanks

    Reply
  2. Hi Simon,

    Great article and it’s been very helpful. A question you might be able to help with.

    I have successfully transferred woo customers and orders in the past, but one thing I can not seem to get right is regarding payments on orders.

    For example, I use Stripe and Paypal. After transferring orders, if I ever have to give a customer a refund, it doesn’t work if trying to issue the refund from the order in Admin. I have ensured I have transferred and installed the Stripe plugin, for example, but I suspect there is some metadata or something that is not getting transferred, or if it is, something prevents it from being used — maybe a fraud type of prevention?

    Any insights?

    Thank you

    Reply
    • Hey Jason, is this only happening on orders paid with Stripe or with PayPal? Diagnosing if it’s Stripe or PayPal should help you get to the bottom of this. For example, if you see this only happening when processing refunds with Stripe then I would double check that all webhooks with Stripe are enabled. For reference, this may help: https://woocommerce.com/document/stripe/#webhooks

      Reply
  3. Hi – we are using the recommended sky verge plugin but keep running into an issue without guest orders that even skyverge support has not been able to help us with

    Our issue is that when we are importing customers who purchased as guests, they are assigned a “customer_id) of 0. Somewhere along the lines, the plugin is replacing the 0’s with numbers. This is causing current customers with customer numbers to be essentially overwritten, and when we pull up their data, the new site is wrong.

    Reply
  4. Thank you so much brother. You saved me a lot of trouble. I transferred my site in a short time, there was no one like you, thank you very much.

    Reply
  5. Hi Simon

    An admin user that had done some work for us adding content to our LMS was accidentally deleted, and this took out almost half our database (a painful lesson to be sure). I can restore the site from back up, but since then, we have added some new users that will be lost if I do. Is this an effective tool to export new customers/orders from the new DB, and import them into the old, restored database?

    Reply
    • Hi Todd, yes it is and that is what I would exactly do. Restore the database and import the new customers first. If they have orders import their orders as well but after you import them as customers first. Hope this helps!

      Reply
  6. Hi Simon,

    We are moving from PMPro to WooCommerce Subscriptions & Memberships.

    We would like to import the members history of their old subscriptions. We are using the Github CSV importer which seems to be working well so far.

    One stumbling block.

    We would like to import an old subscription & set the status to Expired.

    For example, Expired Subscription from 3rd Jan 2021 to 3rd Jan 2022.

    The only problem is, when we set the status to Expired, WooCommerce automatically changes the End Date to the current time. So for example, the End Date would then say ‘a few seconds ago’ instead of 3rd Jan 2022.

    Any idea’s how to overcome this?

    I tried to find your contact details to email you. Happy to pay for your consulting here. Thank you.

    Reply
  7. “I have made this mistake by not utilizing this plugin and sent over 5,000 order notification emails to past customers from orders 5 years ago!”

    Just a heads-up, this is a punishable fine in the EU. Since EU citizens have “the right to be forgotten” as in; you shouldn’t store data any longer then necessary!

    If you process orders for any EU citizens, make sure your website is GDPR compliant. WooCommerce has a builtin feature to automatically anonymize orders older then xx months. You only need to enable it to be compliant.

    Reply
  8. Hello Simon, great video and explanation.
    I have two sites, A and B. Before I develop site B, I imported the DB from A to B and I commenced development, which includes adding a lot of custom fields and some changes to the attributes.
    The problem I am having now, is that site A and site B has 60% of the products sharing the same ID; but since the attributes are not the same now, the variation ID are different; also I updated some of the contents on siteB so siteB has the most updated product information (in terms of what I want to launch). When I imported the order from A to B, all orders are created but the problem is some of the products are missing (because of the different product ID).
    Do you suggest me to add the SKU on siteA (I can use a plugin to generate them) and export the product from site A, import to site B and when I migrate the orders, I map the product by SKU ?

    Reply
    • Hi Louis, yes that is what I recommend doing. If your product IDs differ you can map by SKU. As you said you have to add the SKUs to Site A then re-export your Orders, then import to Site B and map by SKU not product ID.

      Reply
  9. Hi Simon, few questions regarding migrating Subscription orders from one WordPress site to another:

    – Have you used this plugin before to handle this process – https://www.webtoffee.com/import-and-export-woocommerce-subscriptions-orders/ ?
    – Either way, could you let me know whether you think this is a viable and reliable solution to export subscription orders from the origin site and import them to the destination site in which the associated customers are already migrated?
    – How would you compare this to your recommended extension in one of your comments above – https://github.com/woocommerce/woocommerce-subscriptions-importer-exporter ?
    – Could I use either of these solutions to import only past subscription renewal orders to existing Subscription parent orders on the destination site?
    Thanks so much for your help, Simon.
    Best,
    Brad

    Reply
    • Hey Brad, you could use either one of those solutions to migrate subscriptions. You may be better off using WebToffee as you could ask their support team any follow up questions since it is a paid plugin. Let me know how it goes!

      Reply
  10. Do user accounts need to be migrated first before customers and orders? The customers did import, but it didn’t make accounts for them. The steps in this post led to all guest orders.

    Reply
      • I’m asking about user accounts and then customers. Do user accounts need to already be migrated before customers?
        Unfortunately, when we imported Customers, accounts were not made.

        Reply
        • Hey Brittany, yes you need to migrate (export/import) customers before migrating your orders. When you imported your customers do you see them if you go to Users on your WordPress dashboard?

          Reply
      • They weren’t the same, but I got the skus matched up.
        I just purchased and downloaded the csvs. and the field are different. There is no password column

        Reply
  11. Hello,
    Thank you for this tutorial which should save me a lot of time, just one question:
    I made a copy of my site to make a new version of it, unfortunately, it took longer than expected and I therefore have a big gap between the orders for the online site and the version in development.
    Can I use these plugins and tutorials to import just the difference?

    Reply
    • Hey David, I would do exactly this. Import just the difference. You also would need the Sequential Order Numbers plugin to make sure the order numbers do not override the post IDs. Export orders from the original site after installing the Sequential Orders plugin. Import the orders to the development site after installing the Sequential Order Numbers plugin and skip importing the order id. Let me know how it goes.

      Reply
  12. There is a woocommerce site (Live site – domainname.se), I want to import orders, coupons, customers, images etc to a site (domainname.com/SV) in a multisite network. How to make this happen? What will be the issues?

    After or before doing migration, I need to also change the DNS for the multisite (domainname.com/SV)

    What are my possibilities for this migration ?

    Reply
  13. Hey, for some reason after I did this for my WooCommerce membership database, many of my customers that should only have a 1 year membership (for example: February 2, 2021 – February 2, 2022) now have a two year membership as many expiration dates were changed to February 2, 2023 in this example above. Any idea why these expiration dates would change during the migration from old site (all dates correct) to new site (some/alot extended another year). Any help would be greatly appreciated!

    Reply
  14. Hi Simon, I have a site that offers exclusively digital downloads, all guest orders. With this method would original links that were dispatched when the order occurred still work or not?

    Reply
    • Good question. I do not have an exact answer for orders that are exclusively digital downloads. However, you would have to upload all original digital downloads to the specific product. Then, based on each order, you would have to specify the download in the “download_permissions_granted” CSV column. You will have to test this out with the product CSV import/export plugin.

      Reply
  15. Hi Simon – is it possible to migrate customers/orders in WooCommerce SUBSCRIPTIONS, so that future subscription payments are taken automatically without contacting the customer? Or would I have to go back to the customer to set up the new regular payment?

    Reply
  16. Will the data still be there on the old website? Can I do this before the new one is live and only in temp status?

    Reply
    • Yes for sure. I would recommend migrating the historical orders when the new one is live and only in temp status. Then, when the new site launches, migrate any historical orders that were made the last few days (if they have not been migrated yet).

      Reply
    • Hi Nanna, if you have already used the Order / Customer CSV Export plugin or Order / Customer CSV Import Suite plugin to import/export orders, you no longer need to have the plugin activated on the website. So yes, you can either deactivate the plugin or delete the plugin from WordPress.

      Reply
    • Hi Lynda, are you saying that you have exported your orders and it has been 4 hours and your order export is still “processing”? To just export your orders, it shouldn’t take 4 hours, it should usually take 5-15 minutes at the most. Typically if a client’s order export is freezing, it is likely due to a conflict between your theme and hosting platform. I would recommend reaching out to your hosting platform and asking them reasons that this could be happening. Note, from doing this several times during client order migrations, you typically need to talk to a senior level support person to solve this issue, so when you get to your hosting platforms live-chat, I would ask immediately if you can talk to somebody that is the highest experience level.
       
      Let me know if that works/helps, and if not, email me at [email protected] and I can provide you other suggestions.

      Reply
  17. Hi, will this work if the site i’m importing to already has users & orders?
    Will the plugins know to override the current users/orders or add only the ones that are missing?

    Reply
  18. This plugin didn’t work for me for importing orders. When importing products to my new site, it changed all the product ids, so when I go to import the order data, none of the orders will map correctly as it says “unknown product id”. Any idea on how to fix this?

    Reply
    • Hey Kayla, You need to replace your product ids from your old site with product ids from your new site. One way to do this is to export all your products from your new site to find all of your new site’s product ids. Then in your excel file, do a find and replace of all of your old product ids with all of your new product ids. When you import your orders, each order will now be able to map to the correct product.

      Reply
  19. Great tutorial, however, my guest orders are still not pulling through? I can’t see my guests on the customer csv file? Should they be on there?

    Reply
    • Hi Nicole, You not need to import the guest customers account/information into WooCommerce. Note, guest customers are imported during Phase 4 (Import orders), as these orders will still be imported as orders created by guest accounts.

      Reply
  20. Thank you for this nice and nifty short help. Worked for me.
    On a side note; the current versions of the plugins you’re mentioning, look different (as of 4th May .2020). You might want to update the screenshots.

    Reply
  21. Hi Simon, thank you for this very helpful tutorial. How should we treat multi items orders? Should we create one “line_items” column for each ordered product or one “line_items” column for all items included in the order? In that case, how should the items be separated from each other? Many thanks for your advice 😉

    Reply
    • Hi JP, good question! Each order is a single row in your CSV file. So for multi items orders, you would separate the line items in the “line_items” column. This is where it can get confusing. You can either import using JSON or “pipe-delimitted” value.
       

      For example, if I was importing an order that had a Blue T-Shirt and Red Hat the “line_items” column is broken down into the 2 different formats:

      JSON

      [{"product_id”:1,”sku”:”TEE-BLUE-L”,”product_name”:”Blue “Shirt”, “quantity":1,"total”:20.00}, {"product_id”:5,”sku”:”HAT-RED-OS”, “product_name”:”Blue Shirt,”quantity":1,"total”:20.00}]

       
      Pipe delimiter

      product_id:1|sku:TEE-BLUE-L|name:Blue Shirt|quantity:1|total:20.00;product_id:5|sku:HAT-RED-OS|name:Red Hat|quantity:1|total:10.00
      Reply
      • Hi Simon, is there any better way to fill in the line_items into the csv for new orders to import? Do i need to re-define all the sku,name,product_id on each order row since all the product were already uploaded in the website..
        people can easily make mistake with the sequence & all the required symbols (;|:)
        Thanks

        Reply
  22. I’ve tried to import customers with updated usernames but the change isn’t showing. Is the only way to first delete the customer and import again?

    Reply
    • Yes I would delete the customer and import again. If the customer has the username “johndoe” and email “[email protected]”, the username will be “johndoe” and cannot be changed after import. If you wanted to set the username as the email, either set the username and email as both “[email protected]” or just do not include the username field and only the email field “[email protected]”. If you do not include the username field it will be set to the email. Does this make sense? 🙂

      Reply
    • You can remove them before importing the customers. I usually open up the exported customers CSV file into Google sheets and then remove the rows that have customers without the usernames and password columns. When you import your orders, the users without customer_user will default to guest accounts. Does this make sense?

      Reply
  23. Hi Simon. Thanks for sharing your experience with orders migration. I have tried the steps you mention and all seems to work except for one thing that is very important in my case. The orders numbers are not kept as they are in the csv file and they are replaced with new website default order numbers. Did you ever experience this? Any suggestion on what could be the cause and solution to this. Thanks anyway for sharing your article and video.

    Reply
    • Hi Fernando, every post on a WordPress site has a unique, auto-incremented post ID. This is also why your order numbers are not sequential by default: the order number typically equals order ID; this ID is pulling from a counter that’s also incremented each time a product, blog post, page, or other content is added.
       
      A solution is to download and activate the WooCommerce Sequential Order Numbers plugin on both sites. For example, on Site A before exporting your orders, install and activate Sequential Order Numbers plugin > then export your orders. On Site B, before importing your orders, install and activate the Sequential Order Numbers plugin > then import your orders. I added a screenshot under this question in the Frequently Asked Questions section to import your orders file with the first and second columns as “order_number” and “order_number_formatted” and not including “order_id” since this will be auto-incremented when importing to Site B.
       
      Does this make sense? Let me know!

      Reply
  24. Hi Simon,
    Thanks for a great post.
    I will potentially need to migrate Woocommerce data for a site that also uses the ‘WooCommerce Subscriptions’ plugin. Would that add any steps to the ones listed above? Or is the Subscription data held with the Orders data?

    Reply
    • Hi Caitriona, the Woocommerce CSV Export plugin will export all “regular” orders as well as parent and renewal orders of “Subscriptions”. However, the CSV Export plugin will not export the Subscriptions. To migrate Woocommerce Subscriptions (not parent or renewal orders associated with each subscription), I would recommend using the Woocommerce Subscriptions Importer/Exporter extension.

      If exporting/importing Woocommerce Subscriptions using the extension above, I would recommend to do the following:

      • Not using the customer_id column and instead formatting the CSV file and adding either the customer_email or customer_username column to avoid overriding post IDs if migrating historical subscriptions.
      • Ensure that the order_items are either the product id or specific variation id.

      Overall, this is a complicated process to migrate both orders and all subscription data. This is something I could assist with if you send me a email to simon[at]sgwebpartners.com with more details.

      Cheers!

      Reply
  25. Hi Simon.

    Very helpful tutorial, though before I give it a go, can you elaborate if I need to import the products?

    Have had a go with another tutorial in the past and whilst I got the orders over, they didn’t link up to any products, so it showed the orders, but didn’t link to products, so we couldn’t do follow up emails or see data on products sold.

    Would it be advised to import all the products first so that the orders show the products purchased?

    Thanks again.

    Reply
    • Hey Aaron: Yes you are correct! Import the products first before importing your orders. Order items can be mapped to the products via SKU or product_id. I would recommend importing the products first (you can ignore the product_id column), and then importing the orders after. Doing so this way will allow the items in each order to be matched with a specific product by SKU. Does this help? Let me know if can answer any other questions or help.

      Reply
      • @Simon – are you saying that while the same products over in the new site will get new ID’s, it won’t matter when I bring over Customers and Orders – since they (the orders) are all in the past?

        Reply
  26. Hey Simon thank you for this post! Can you explain more why you removed the “id” column from the exported CSV file when importing the orders into the new site?

    Reply
    • Hi Wesley, happy to help. The reason I removed the “id” column in the CSV file is that if you are moving orders from one site to the other, the post IDs could differ and thus . The post ID in WordPress is auto incremental and all posts (i.e. pages, blog posts, orders, etc.) on the site use the post ID, not just orders. By default, WordPress will not overwrite existing post IDs, meaning that if you attempt to import an order that has an existing post ID that differs from the order being imported, your order will not get imported. Did my explanation help? I realize this can be confusing.

      Reply

Leave a Comment