This guide covers how to migrate only WooCommerce order and customer data from one site to another. This process can be helpful when a staging site is out of sync with production, or when you need to perform an e-commerce migration without putting the origin site into maintenance mode to stop new orders during the migration window.
Before starting any migration back up both source and destination databases using Pressable’s backup tools or phpMyAdmin export.
These steps are intended for technical users. Partial database migrations are outside Pressable’s scope of support, although the support team is happy to answer questions and provide general guidance. We provide this information so you can choose the method that best fits your workflow and resources.
Understanding WooCommerce Order And Customer Data
WooCommerce stores order and customer information across several core tables. The most relevant include the following.
When HPOS Is Off (Legacy Storage)
Core order and customer tables to export/import:
wp_posts(orders are stored aspost_type = 'shop_order')wp_postmetawp_woocommerce_order_items(legacy item storage)wp_woocommerce_order_itemmetawp_users(customers)wp_usermetawp_woocommerce_payment_tokensandwp_woocommerce_payment_tokenmeta(if used)- Any plugin custom tables that store order/customer metadata (varies based on installed plugins)
Note:
wp_posts+wp_postmetamust be migrated together; otherwise order records will be broken.
When HPOS Is On (HPOS / Custom Order Tables)
Core HPOS order tables to export/import:
wp_wc_orders(main orders table)wp_wc_order_addresses(billing/shipping addresses)wp_wc_order_operational_data(internal operational state)wp_wc_orders_meta(order meta stored in HPOS)
Important lookup / index / reporting tables you should also consider (HPOS or mixed environments):
wp_wc_order_stats(order stats index used for reports)wp_wc_order_product_lookup(order->product lookup)wp_wc_order_tax_lookupwp_wc_order_coupon_lookupwp_wc_customer_lookup(customer lookup table; used heavily for reports and queries)wp_wc_product_meta_lookup(product lookup; relevant if migrating product-related lookups)
Note:
- Some of these lookup tables are populated by background processes and sync jobs. Copying them can be useful for reporting continuity, but you may also be able to regenerate them after import using the “Regenerate Product Lookup Tables” tool mentioned in the After Migration Steps section.
If A Site Has HPOS Enabled But You Are Merging Into A Non-HPOS Site (Or Vice Versa)
You cannot simply copy HPOS tables into a site that is not also using HPOS without first running the WooCommerce migration/sync to convert the destination site to HPOS; doing so will create mismatches.
WooCommerce’s guide to enabling HPOS can be found here.
If you’re comfortable using command line options, you may opt to use the WooCommerce HPOS migration/sync tooling instead. Common WP-CLI commands to help manage HPOS migration and sync include:
wp wc hpos status(check current HPOS status)wp wc hpos sync(sync between storage types)wp wc hpos migrate(migrate orders between storage types)
Check WooCommerce’s official documentation for current command syntax and options, as these may change with WooCommerce updates.
Your installation may have additional tables created by extensions or payment gateways. Confirm which tables your plugins use before migrating.
Option 1: Migration Plugins That Support Table Selection
Several plugins allow selective migration of specific database tables. This is the easiest method when supported.
Common options include:
General workflow:
- Install the migration tool on both the source and destination sites.
- Select only the WooCommerce related tables or a custom set of tables.
- Run the migration and confirm that no other site data is overwritten.
Notes:
- Large datasets may require multiple migration passes due to upload limits and PHP timeouts.
- Always create a backup before running a plugin based migration.
Option 2: Manual Export And Import Using phpMyAdmin
phpMyAdmin allows you to export and import specific tables directly.
To export:
- Open phpMyAdmin from the Pressable control panel.
- Select the source database.
- Choose only the required tables.
- Export using the SQL format.
To import:
- Select the destination database.
- Use the Import tab to upload the SQL file.
- Confirm that the data has appeared in the correct tables.
Important considerations:
- Importing may overwrite existing rows for the selected tables if order numbers or ID values are duplicated.
- Ensure related tables are exported together. For example,
wp_woocommerce_order_itemsand its associatedwp_woocommerce_order_itemmetatable must be migrated as a pair or order item data will be incomplete. The same applies towp_postsandwp_postmeta,wp_usersandwp_usermeta, and similar parent/child table relationships. - Back up both databases before beginning.
Option 3: Manual Export And Import Using WP-CLI
WP-CLI allows you to export specific tables at the command line. This is useful for larger datasets or automation.
Examples:
Export a single table:
wp db export orders.sql --tables=wp_posts
Export multiple tables:
wp db export woo.sql --tables=wp_posts,wp_postmeta,wp_woocommerce_order_items,wp_woocommerce_order_itemmeta
Import into the destination site:
wp db import woo.sql
Pressable’s server configuration requires specific parameter ordering for WP-CLI commands. If a command fails, try adjusting the order of flags and parameters (for example, placing table names before the export filename). If you continue to experience issues, consult the WP-CLI reference for alternate parameter structures.
Option 4: Export And Import Using Bash Tools
Pressable provides SSH/SFTP access to your site. You can connect to SSH on Pressable to use raw database tools like mysqldump for table specific exports. This method provides the most control and is often preferred for very large WooCommerce datasets.
You can find your site’s database name in the upper left corner of phpMyAdmin.

Example export:
mysqldump [DATABASE NAME] wp_posts wp_postmeta wp_woocommerce_order_items wp_woocommerce_order_itemmeta > woo.sql
Example import:
mysql [DATABASE NAME] < woo.sql
Option 5: API Based Migration
Developers may use WooCommerce REST API endpoints to pull and push order or customer data. This is the most flexible option for complex migrations or when you need fine-grained control over what gets migrated, but it requires scripting knowledge and development time.
After Migration Steps
Once data has been transferred:
- Verify migration success by checking several recent orders to confirm all data (customer info, order items, metadata) transferred correctly.
- Open WooCommerce, then Status, then Tools, and run:
- Regenerate Product Lookup Tables
- Recount Terms
- Clear WooCommerce Transients
- Clear the Pressable object cache with:
wp cache flush
- Confirm that any payment gateways or shipping plugins still recognize customer records.
- Review webhook settings or API credentials for staging sites moved to production.
Common Pitfalls To Avoid
- Forgetting to copy
wp_postmetaandwp_usermetaalong with their parent tables. - Missing custom tables created by payment gateways or fulfillment plugins.
- Importing into a site where orders with matching IDs already exist can cause overwrites or conflicts. Consider whether you need to merge data or fully replace it before proceeding.
- Keeping old staging URLs in order notes or metadata that trigger unexpected behavior.
Summary
There are several ways to migrate WooCommerce order and customer data depending on your level of comfort and the complexity of your store. Plugin based migrations are simplest, database exports are the most accurate, and CLI tools offer the greatest flexibility.
Always back up your sites before making changes and verify data integrity after import.