<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Focus on your mission, not your tech - Another Cup of Coffee (Posts about Ecommerce)</title><link>https://anothercoffee.net/</link><description></description><atom:link href="https://anothercoffee.net/categories/ecommerce.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Copyright © 2006 - 2026 &lt;a href="https://anothercoffee.net/" title="Another Cup of Coffee Limited"&gt;Another Cup of Coffee Limited&lt;/a&gt; </copyright><lastBuildDate>Wed, 18 Feb 2026 16:39:45 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Ubercart to WooCommerce migration notes</title><link>https://anothercoffee.net/ubercart-to-woocommerce-migration/</link><dc:creator>Anthony Lopez-Vito</dc:creator><description>&lt;p&gt;I've now had several Ubercart to WooCommerce migration projects so it's time to start documenting the process. As with all my documentation, I'll start off this post as rough notes and improve it over time. If this topic interests you, be sure to check back every so often to see the updates. Please keep in mind that I'm writing this from the standpoint of &lt;a href="https://anothercoffee.net/drupal-to-wordpress-migration-guide/" title="Drupal to WordPress Migration Guide"&gt;Drupal to WordPress migrations&lt;/a&gt;. In other words, the main objective for the projects were to migrate a Drupal site to WordPress but there was also an Ubercart to WooCommerce component.&lt;/p&gt;

&lt;h2&gt;Key differences between Ubercart and WooCommerce&lt;/h2&gt;

&lt;p&gt;There's one key difference between Ubercart and WooCommerce from an architectural point-of-view. Ubercart stores products as nodes and orders are stored in a separate table &lt;code&gt;uc_orders&lt;/code&gt;. Orders have an &lt;code&gt;order_id&lt;/code&gt; and there's no direct relationship in &lt;code&gt;uc_orders&lt;/code&gt; to a product's node ID. Instead, the &lt;code&gt;uc_order_products&lt;/code&gt; table stores the relationship between orders and products purchased with the order.&lt;/p&gt;

&lt;p&gt;WooCommerce stores both products and order transactions as posts in the &lt;code&gt;wp_posts&lt;/code&gt; table. The post ID is used as the order's transaction ID. Products purchased with the order are stored in &lt;code&gt;wp_woocommerce_order_items&lt;/code&gt;, with additional product metadata being strored in &lt;code&gt;wp_woocommerce_order_itemmeta&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Obviously there are many more differences but this information architecture is the key thing to keep in mind when migrating the data.&lt;/p&gt;

&lt;img style="margin:10px 0 10px 0" src="https://anothercoffee.net/images/ubercart-woocommerce-01.png" alt="Ubercart to WooCommerce table mapping" width="481" height="155" class="aligncenter size-full wp-image-3069"&gt;

&lt;h2&gt;Database tables&lt;/h2&gt;

&lt;p&gt;Here are the main database tables that you'll need to migrate Ubercart content to WooCommerce.&lt;/p&gt;

&lt;h3&gt;Ubercart&lt;/h3&gt;

&lt;table width="100%" class="table-bordered" style="padding:5px"&gt;
&lt;caption&gt;Table: Drupal Ubercart tables&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th width="50%"&gt;Table&lt;/th&gt;
&lt;th width="50%"&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="odd row-first"&gt;
&lt;td&gt;node&lt;/td&gt;
&lt;td&gt;Products are stored in the Drupal &lt;code&gt;node&lt;/code&gt; table.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="even"&gt;
&lt;td&gt;uc_orders&lt;/td&gt;
&lt;td&gt;Stores the individual Ubercart transactions.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td&gt;uc_order_products&lt;/td&gt;
&lt;td&gt;Stores the products purchased during the transaction.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="even"&gt;
&lt;td&gt;uc_order_line_items&lt;/td&gt;
&lt;td&gt;Line items for an order. This includes tax and shipping fees applied to an order.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td&gt;uc_order_comments&lt;/td&gt;
&lt;td&gt;Customer or administrator notes associated with each order.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="even"&gt;
&lt;td&gt;uc_order_log&lt;/td&gt;
&lt;td&gt;Comments about the order status by the shop administrator.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td&gt;uc_zone&lt;/td&gt;
&lt;td&gt;Country zone codes for customer billing and delivery.&lt;/td&gt;
&lt;/tr&gt;&lt;tr class="even"&gt;
&lt;td&gt;uc_countries&lt;/td&gt;
&lt;td&gt;Countries and zone codes in ISO 3166-1 Alpha-2 and Alpha-3 code format for customer billing and delivery.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;



&lt;h3&gt;WooCommerce&lt;/h3&gt;

&lt;table width="100%" class="table-bordered"&gt;
&lt;caption&gt;Table: WordPress WooCommerce tables&lt;/caption&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th width="50%"&gt;Table&lt;/th&gt;
&lt;th width="50%"&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="odd row-first"&gt;
&lt;td&gt;wp_posts&lt;/td&gt;
&lt;td&gt;Stores products and transactions.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="even"&gt;
&lt;td&gt;wp_postmeta&lt;/td&gt;
&lt;td&gt;Transaction meta data.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td&gt;wp_woocommerce_order_items&lt;/td&gt;
&lt;td&gt;Stores the line items for a transaction in the &lt;code&gt;wp_posts&lt;/code&gt; table.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="even"&gt;
&lt;td&gt;wp_woocommerce_order_itemmeta&lt;/td&gt;
&lt;td&gt;Stores the meta data for line items, such as quantity, price and tax information.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="odd"&gt;
&lt;td&gt;wp_comments&lt;/td&gt;
&lt;td&gt;Order notes.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Order transactions and products are saved as WordPress posts. One or many order item meta entries can be linked to an order.&lt;/p&gt;

&lt;h2&gt;WooCommerce shop orders&lt;/h2&gt;

A WooCommerce transaction is saved as a shop order in the &lt;code&gt;wp_posts&lt;/code&gt; table.

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;post_status = wc_completed&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;post_type = shop_order&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;WooCommerce subscriptions&lt;/h2&gt;

&lt;p&gt;WooCommerce subscriptions are saved in &lt;code&gt;wp_posts&lt;/code&gt;. A subscription is made up of two entries:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The transaction order for a subscription.&lt;/li&gt;
&lt;li&gt;The subscription itself.&lt;/li&gt;
&lt;/ol&gt;


&lt;h3&gt;Subscription transaction order&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;post_status = wc_completed&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;post_parent = 0&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;post_type = shop_order&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;The subscription&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;post_status = wc_active&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;post_parent = [post ID to the transaction shop order]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;post_type = shop_subscription&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--
When adding a subscription order's product data to the &lt;code&gt;post_type=shop_subscription&lt;/code&gt; it's important to attach products to the &lt;code&gt;shop_subscription&lt;/code&gt; ID not the &lt;code&gt;shop_order&lt;/code&gt; ID, otherwise the subscription title will not be displayed in the user's &lt;em&gt;My Account&lt;/em&gt; page.
--&gt;
&lt;h2&gt;Products&lt;/h2&gt;

Purchased products are saved as line items in the &lt;code&gt;wp_woocommerce_order_items&lt;/code&gt; and &lt;code&gt;wp_woocommerce_order_itemmeta&lt;/code&gt; tables.

&lt;p&gt;A WooCommerce product can be of any post type. The product post is linked to a shop order transaction by setting the product's post ID in the &lt;code&gt;wp_woocommerce_order_itemmeta&lt;/code&gt; table:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;meta_key = _product_id&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;meta_value = [post ID to the product]&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr style="margin-top:5em"&gt;
&lt;h3 id="notes"&gt;Notes&lt;/h3&gt;

&lt;p&gt;My apologies if you've come here looking for more complete documentation. I've been planning to write this post for more than two years but have been putting it off due to my work schedule. I figure the best way to finally get it done is to just make a start and update it as time allows.&lt;/p&gt;

&lt;p&gt;The most-viewed articles here started off as notes for my own use and evolved over time. This one is no different. Hopefully it will still be of use to some people in its draft state.&lt;/p&gt;

&lt;p&gt;In the meantime, you might want to take a look at these other articles and plugins.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.webtoffee.com/export-woocommerce-orders-import-back-new-website/"&gt;How to Export WooCommerce Orders and Import Them Back into New Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sgwebpartners.com/moving-orders-in-woocommerce/"&gt;How To Migrate WooCommerce Customers and Orders (Like A Pro!)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.skyverge.com/blog/moving-woocommerce-orders-sites/"&gt;Moving WooCommerce Orders Between Sites&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://woocommerce.com/products/ordercustomer-csv-export/#"&gt;WooCommerce Customer / Order / Coupon Export&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://wordpress.org/plugins/woocommerce-sequential-order-numbers/"&gt;WooCommerce Sequential Order Numbers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://woocommerce.com/products/customerorder-csv-import-suite/#"&gt;Customer/Order/Coupon CSV Import Suite&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><category>Drupal</category><category>Ecommerce</category><category>Migration</category><category>Ubercart</category><category>WooCommerce</category><category>WordPress</category><guid>https://anothercoffee.net/ubercart-to-woocommerce-migration/</guid><pubDate>Fri, 24 Jan 2020 12:14:07 GMT</pubDate></item></channel></rss>