Want to know how to import and export WooCommerce orders? In this article, we’ll start by teaching you the basics. Then we’ll dive deep into the most challenging problems you’ll encounter when performing these tasks. By the end, you should be able to handle pretty much any WooCommerce order import or export. Here is what is contained in this article:
How to Export WooCommerce Orders
Finding the Right Order Export Plugin
Step-by-Step Instructions to Export WooCommerce Orders — The Basics
Export WooCommerce Orders — Advanced Topics
Export WooCommerce Orders — Frequently Asked Questions
How to Import WooCommerce Orders
Finding the Right Order Import Plugin
Step-by-Step Instructions to Import WooCommerce Orders — The Basics
Import WooCommerce Orders — Advanced Topics
Import WooCommerce Orders — Frequently Asked Questions
Despite its extensive functionality, WooCommerce does not have the ability to export orders on its own. For this, you require a third-party plugin.
If you search the internet, you will find several plugins capable of exporting WooCommerce orders. Unfortunately, most of them suffer from the same two limitations:
The one plugin that doesn't have these limitations is WP All Export. It can handle every aspect of exporting WooCommerce and WordPress data, no matter how complex. The same is true on the import side with WP All Import.
Download and install the base WP All Export plugin and its WooCommerce Export Order add-on. If you don't have access to these plugins, you can use this free online sandbox. Just choose the WooCommerce Store option and click Create Sandbox.
Navigate to All Export > New Export in the WordPress main menu. Select WooCommerce Orders as the export type. Then click the blue Customize Export File button at the bottom:
When exporting WooCommerce orders, most users do not require all the order data fields. WP All Export provides a simple Drag & Drop interface to let you select a subset of these fields. The available order tables and fields are displayed in the Available Data section on the right. To export a field, drag it into the column selection area. For example, here, we have expanded the Order panel on the right and dragged the Order Status field into the column selection area:
Here, we have expanded the Customer panel on the right and dragged the Billing Last Name and Billing First Name fields into the column selection area:
To remove a field, simply drag it from the column selection area and drop it elsewhere.
WP All Export lets you select fields from all of these order-related categories:
Once you’ve completed setting up your order export, click Continue, then verify the export settings. To run the export, click Confirm & Run Export. You can then click either the CSV or Bundle button in the Click to Download section:
The bundle file contains both a CSV file and a template that helps WP All Import automatically import the CSV file. This makes migrating orders from one site to another quick and easy.
That’s it! A basic WooCommerce order export couldn’t be any easier!
Some of the instructions in this section require the Pro version of the plugins, which you can read about in Export WooCommerce Orders to XML & CSV. Our online sandbox uses these versions.
In case you do not have these versions and you're not using our online sandbox, we have provided sufficient visuals to allow you to read the following examples without performing them.
The preceding example exported orders to a CSV file, but you can quickly change this to Excel simply by changing the export type in the Drag & Drop interface:
Prefer XML? Not a problem:
Note, you can export WooCommerce orders to a Simple XML Feed or a Custom XML Feed. If you choose a custom feed, you can make this feed as sophisticated as you require.
Applying filters to your WooCommerce order export is easy. You can do this in the Add Filtering Options section of the New Export screen:
This filter means, “Export WooCommerce orders with an order date equal to or newer than January 01, 2018.” You can also combine filters:
And create nested filters, which is the same as grouping filter conditions using parentheses. No other plugin offers this level of filter capabilities.
In the Drag & Drop interface, if you click the Add Field button:
This allows you to create custom order export columns. In the following example, we’ve used drag & drop to combine the Billing First Name and Billing Last Name fields into a custom column called “Name”:
That’s a simple custom field. To create a more complex field, you can use the Function Editor (shown above) to define your field using PHP:
function output_shipping($weight){ if($weight <= 10) { return "USPS"; } else if ($weight > 10 && $weight < 30) { return "DHL"; } else if ($weight >= 30) { return "Knight-Swift Freight"; } }
Then just refer to the function in the Custom export field box, like this:
It is a testament to WP All Export that we have barely even scratched the surface of its WooCommerce order export capabilities. Other advanced features include the ability to:
Yes. WP All Export automatically detects all custom fields created by any theme, plugin, or WooCommerce extension. You can export these fields just as easily as regular fields.
No. WP All Export lets you control every aspect and detail of XML output.
If you just run a standard order export without applying any filters, you will export all WooCommerce orders by default. If you have a large number of orders, you can avoid overwhelming your server's resource limits by splitting your export into multiple files in the Export Settings screen.
Export the orders that you wish to migrate. When you do this, download the "Bundle" option instead of a CSV file. The bundle file contains import settings data in addition to the order export data. Upload the bundle file on the other site. WP All Import will automatically know how to process the bundle file based on its settings.
As with exporting orders, WooCommerce does not have the built-in capacity to import orders. Your only choice is to use a third-party plugin.
Most of the plugins available to import WooCommerce orders suffer the same two limitations as those available for exporting orders: if you're attempting anything other than a simple import, you will quickly run into limitations. And if you want to import data other than WooCommerce orders, especially if you ever want to import WordPress data, you'll find yourself shopping for an additional plugin. Our suggestion is: don't bother. WP All Import will let you import every kind of WordPress and WooCommerce data without any limitations.
The other advantage of this plugin is that every import and export follows the same basic model and procedures, whether you're importing WooCommerce orders, customers, products, etc., or WordPress posts, pages, taxonomies, etc. You just have to pay for one plugin and learn one basic way of doing things, then you can forever put aside the question of how you import and export data.
To perform an order import, you need the base WP All Import plugin and the WooCommerce Import Add-On Pro plugin. If you don't have access to these plugins, you can use this free online sandbox. Just choose the WooCommerce Store option and click Create Sandbox.
Go to All Import > New Import in the WordPress main menu.
This screen allows you to check whether the order import file has been correctly parsed. If not, go back to Step 1, fix the problem with your file, then try again.
Usually, the file is parsed without a problem. If so, just click the Continue to Step 3 button. Note, you can also add order import filters here by expanding the Add Filtering Options panel, but we cover this topic in the Import WooCommerce Orders — Advanced Topics section.
The Drag & Drop interface will now appear. This is where you map the incoming data elements to the WooCommerce order fields. To do this, just drag the data elements from the panel on the right to the target fields on the left. In this case, we're trying to populate the Order Status field in the Order Details section:
Next, expand the Billing & Shipping Details section and drag and drop the incoming billinglastname and billingfirstname data elements to their target fields.
As you can see from the preceding images, there are many sections and many fields that can and should be populated in an order import. The main sections are:
Others might appear depending on the plugins or WooCommerce extensions installed on your site.
We're not going to describe all sections and their fields because it will take too long. Instead, you can read about them WP All Import's documentation article, How to Import WooCommerce Orders.
For now, just click the blue Continue to Step 4 button shown at the bottom of the screen (our Step 5).
The Import Settings screen will now appear. Here, your most important task is to select the unique identifier for the incoming orders. This helps WP All Import differentiate between orders.
The easiest way to select this value is just to click the green Auto-detect button, as shown here:
You can enter this value manually if you wish, but the auto-detect feature usually does a great job of selecting the best identifier.
As you can see from this screenshot, there are many other settings on this screen, including separate sections for scheduling and advanced settings. We'll describe some of these in the Import WooCommerce Orders — Advanced Topics section.
For now, just click the blue Continue button at the bottom.
The next screen in the process is the Confirm & Run screen:
This screen provides a convenient Import Summary section that allows you to review what will happen during the order import prior to proceeding with it. If you spot a mistake, you can go back to the previous steps (not shown) and correct whatever is wrong.
If everything is okay, click the Confirm & Run Import button.
When the import finishes, this screen will appear:
If you look closely at this screen, you will see that the orders that you attempted to import have all been skipped. This is because the import file lacked information on the customers and products associated with the orders. Again, we did not include this data because it would have taken too long. Instead, we wanted you to experience the basic loop of exporting and importing WooCommerce orders. Mapping additional fields will not change the nature of this process.
If you would like to experience a complete order import, please see our documentation page, How to Import WooCommerce Orders.
In the preceding section, all the imported orders lacked product information. By default, WP All Import tries to match the incoming product SKUs to the SKUs of existing products in the WooCommerce store. In our tutorial, there were no incoming product SKUs, so every order import failed. A much more common scenario is that some of the import orders will have SKUs that do not match your existing products.
One obvious solution to this problem is to edit the import file to correct the erroneous SKUs.
However, there is an alternative. If the product information is present in the import file but lacks the correct SKUs, you can opt to manually import the product data in the Order Items section of the Drag & Drop screen, as shown here:
In this scenario, you simply drag and drop the relevant fields from the import file into the fields shown above.
A similar situation exists for missing customer data, which can be handled in the Billings & Shipping Details section of the Drag & Drop screen:
As the text on the screen suggests, the plugin normally attempts to match incoming customers to existing customers using an email address or some other unique value. But if such a match isn't possible, you can instruct the plugin to create the required customer information on the fly.
WP All Import is full of these types of options to handle pretty much any import or export situation. That's why it is the industry leader.
As with exporting WooCommerce orders, you can import orders from many different file types, including CSV, Excel, and XML. To do this, just upload the file as shown earlier in this tutorial, then the plugin will a) automatically recognize the file type and b) adjust its interfaces accordingly.
For example, if you upload an XML file instead of a CSV file, the information in the Review Import File will display the XML elements:
The basics of creating filters for WooCommerce order imports are similar to those described in the Apply Powerful Filters to Your WooCommerce Order Export section. The main differences are:
To support this, filter rules are placed in a temporary area as you create them, as shown here:
When you are ready to apply these rules, click the Apply Filters to XPath button. This will populate the XPath field in the upper section with the equivalent XPath code, as well as apply the filters to the data.
For most people, this is merely a slight procedural difference compared to export filters. But for advanced users, it is an opportunity to exert unparalleled control. The XPath field is editable, and XPath is a very powerful language, so there are virtually no limits when it comes to building order import filters.
Many order imports occur on a regular cycle. For example, when feeding orders into your main WooCommerce system from a peripheral sales platform. In these scenarios, it is typical to configure your order import to run automatically on a schedule.
To do this, you must first set up your import to download its data from a URL or an existing file on your server. Here, for example, is how you configure an import from a URL:
The reason for this requirement is that scheduled imports must be able to automatically access the import data without user assistance. Obviously, forcing the user to upload a file during the import process violates this principle.
To create an import schedule, you have two options:
The following image depicts the plugin's scheduling interface, which is found in the Scheduling Options section of the Import Settings screen:
To use this interface, do the following:
That's it — your order import will now run on a schedule!
One other caveat when setting up a scheduled import: you must make certain that the new order import file is in place each week before your import starts.
Yes, you should import WooCommerce data in the following order:
This will help reduce the instances in which customers and products in the order import data are missing from the WooCommerce store.
Absolutely. As long as the plugin or extension in question is installed and activated, you can import data into its fields just as easily as you import data into core WooCommerce or WordPress fields.
WooCommerce orders are stored as a custom post type in the wp_posts table. The order metadata is in wp_postmeta. However, WooCommerce also uses its own custom database tables for some item data, such as wp_woocommerce_order_items and wp_woocommerce_order_itemmeta.
Want more information on how to import and export WooCommerce orders? See these key articles:
WooCommerce Order Export - Plugin Description
WooCommerce Order Import - Plugin Description
Official Documentation: How to Export WooCommerce Orders to CSV, Excel, or XML
Official Documentation: How to Import WooCommerce Orders
Official Documentation: How to Migrate WooCommerce Orders
How to Import and Export WooCommerce Customers
How to Export and Import WooCommerce Products
How to Export and Import Variable Products in WooCommerce
Best WooCommerce Bulk Edit Plugins
How to Import and Export WordPress Users
How to Export and Import WordPress Categories and Tags
How to Import and Export Advanced Custom Fields
How to Export and Import Gravity Forms Entries