If your WooCommerce store is a few years old, there’s a good chance your orders are still stored the old way: as WordPress posts, with their details spread across the wp_postmeta table. New stores have used High-Performance Order Storage (HPOS) by default since WooCommerce 8.2 in October 2023. Many older stores never switched.
Moving to HPOS is worth doing. But the risk isn’t the data migration itself. WooCommerce handles that well. The risk is everything around it: the plugin that reads orders straight from the posts table, the custom export someone wrote three years ago, the ERP integration that updates order meta directly. After the switch, those can fail silently. Orders look fine in the admin, while data quietly stops reaching the systems that depend on it.
This guide covers how to find those problems before you migrate, the code changes most stores need, and a step-by-step plan with a way back.
One thing first: not this week#
If you’re reading this in November, don’t migrate before Black Friday and Cyber Monday. A storage change is exactly the kind of thing that should wait for a quiet period. Use the next few weeks to run the audit below on a staging copy, and schedule the actual switch for January. Our Black Friday readiness checklist explains why changes should freeze before peak season.
What HPOS actually changes#
With legacy storage, every order is a row in wp_posts with dozens of rows in wp_postmeta, mixed in with your pages, blog posts and products. With HPOS, orders live in their own tables:
wp_wc_ordersfor the core order datawp_wc_order_addressesfor billing and shipping addresseswp_wc_order_operational_datafor internal fieldswp_wc_orders_metafor custom metadata
Those tables are designed and indexed for orders, so order queries, admin screens and reports generally get faster, especially on stores with many orders. How much faster depends on your store. HPOS won’t fix a slow checkout caused by plugins or hosting. For that, see why WooCommerce stores get slow.
Is legacy storage going away?#
Not on a fixed date. As of mid-2026, there’s no announced removal date for legacy order storage, and WooCommerce’s documentation treats it as opt-in. But new features and plugins are built and tested for HPOS first. As Progressus put it, don’t plan around a cliff, plan around neglect. The longer you wait, the more likely it is that something you depend on stops being tested on legacy storage.
Step 1: Check where you are#
Go to WooCommerce → Settings → Advanced → Features. You’ll see which order storage is active and whether compatibility mode (sync between the two) is on. WooCommerce also lists plugins that haven’t declared HPOS compatibility.
If you have WP-CLI access, this gives you the same information:
wp wc hpos status
Step 2: Audit plugins#
Plugins tell WooCommerce whether they support HPOS. The Features screen flags the ones that don’t.
- Update every plugin on staging and check the list again. Many plugins added support in later versions.
- For each incompatible plugin, check whether you still need it, whether the vendor has an HPOS-compatible version, or whether there’s a replacement.
- Don’t trust the label alone. A plugin that declares compatibility can still have a bug, and a plugin that doesn’t declare it may work fine. Test the features you actually use.
Step 3: Audit custom code#
This is where most problems hide: your theme’s functions.php, a code snippets plugin, a custom plugin someone wrote for the store, and anything that talks to orders from outside WordPress.
A quick way to find suspects:
grep -rnE "get_post_meta|update_post_meta|add_post_meta|delete_post_meta|shop_order|wp_postmeta|post_type=shop_order" \
wp-content/themes/your-theme wp-content/plugins/your-custom-plugin wp-content/mu-plugins
Not every match is a problem. get_post_meta on a product is fine. The problem is code that treats orders as posts. Here are the patterns to fix.
Reading and writing order meta
// Before: treats the order as a post.
$po_number = get_post_meta( $order_id, '_po_number', true );
update_post_meta( $order_id, '_po_number', $new_po );
// After: works with both storage types.
$order = wc_get_order( $order_id );
$po_number = $order->get_meta( '_po_number' );
$order->update_meta_data( '_po_number', $new_po );
$order->save();
Querying orders
// Before: WP_Query on the posts table.
$query = new WP_Query( [
'post_type' => 'shop_order',
'post_status' => 'wc-processing',
'meta_key' => '_wholesale',
'meta_value' => 'yes',
] );
// After: WooCommerce's own order query.
$orders = wc_get_orders( [
'status' => 'processing',
'meta_query' => [
[ 'key' => '_wholesale', 'value' => 'yes' ],
],
'limit' => 50,
] );
Admin screen hooks
With HPOS, the orders list moves from edit.php?post_type=shop_order to admin.php?page=wc-orders, and its hooks change. Custom columns, filters and bulk actions added with the old hooks disappear. For example, columns added with manage_edit-shop_order_columns need the HPOS equivalent, manage_woocommerce_page_wc-orders_columns. Any hard-coded links to the old orders screen need updating too.
Hooks on saving posts
Code that runs on save_post_shop_order or similar post hooks won’t run reliably for HPOS orders. Use WooCommerce’s order hooks instead, such as woocommerce_new_order, woocommerce_update_order and woocommerce_order_status_changed.
Direct SQL
Any query that reads or writes wp_posts or wp_postmeta for orders has to be rewritten. These are the most dangerous cases: a write to the old tables after the switch updates data WooCommerce no longer reads, and nothing shows an error.
Declare compatibility in your own plugins
Once a custom plugin is fixed, tell WooCommerce:
add_action( 'before_woocommerce_init', function () {
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
}
} );
Step 4: Check every integration#
List every system that reads or writes orders: inventory and ERP (Zoho Inventory, NetSuite), email (Klaviyo), project boards (monday.com), accounting, shipping, fulfillment and reporting tools. For each one, find out:
- How it gets order data. Through the WooCommerce REST API or webhooks? Those keep working with HPOS. By reading the database directly? That will break.
- How it writes back. Updating status, tracking numbers or meta through the API is fine. Writing to
wp_postmetaisn’t. - Whether the vendor supports HPOS. Ask, and get the answer in writing.
Custom integrations deserve the closest look. If you built yours with queues and the WooCommerce API, as we recommend in our Zoho Inventory sync architecture guide, you’re probably fine. If someone wrote a cron script that queries wp_postmeta every five minutes, you’re not.
Step 5: Migrate on staging, with sync on#
Make a full copy of the live store, database and files, on staging. Then:
# Turn on HPOS and keep both storages in sync.
wp wc hpos enable --with-sync
# How many orders still need to be copied?
wp wc hpos count_unmigrated
# Copy them (faster than waiting for background jobs on large stores).
wp wc hpos sync
# Check that both storages match.
wp wc hpos verify_data
# If one order looks wrong, see the differences.
wp wc hpos diff 12345
Be careful with verify_data --re-migrate. It re-syncs orders that don’t match, which can overwrite data. Look at the differences with diff first. The full list of commands is in WooCommerce’s HPOS CLI documentation.
Then test what actually matters, on staging:
- Place orders with every payment method, including guest checkout.
- Refund an order, fully and partially.
- Change order statuses, edit an order, add a note.
- Run renewals, if you use subscriptions.
- Check custom columns, filters and bulk actions on the orders screen.
- Check that orders reach every integration with the right data, and that updates come back.
- Run your usual reports and exports and compare them with live.
Step 6: Switch live, and keep the way back open#
- Back up the live database.
- Pick a quiet time. Not a sale, not a launch, not a Friday afternoon.
- Enable HPOS with sync on, the same way as on staging.
- Watch closely for the first days. Check new orders in the admin and in every connected system, every day.
- Keep compatibility mode on for at least a week of real traffic. While sync is on, both storages stay up to date, and switching back to legacy storage is a settings change, not a recovery project.
- Turn sync off once you’re confident. Treat this as the point of no return: from then on, the old tables stop being updated.
Keep in mind that sync adds work to every order save. On a very busy store, plan to keep it on for days, not months.
Step 7: Clean up later#
After HPOS has run without problems for a while, you can remove old order data from the posts tables with wp wc hpos cleanup. There’s no rush. Do it only once you’re sure nothing reads the old tables anymore, and only after a fresh backup.
Quick checklist#
- Don’t migrate during peak season.
- Check current storage and incompatible plugins under Settings → Advanced → Features.
- Update plugins on staging. Replace or remove the ones that don’t support HPOS.
- Search custom code for post-based order access and rewrite it with WooCommerce’s order functions.
- Fix admin hooks and links for the new orders screen.
- Confirm every integration uses the API, not the database.
- Migrate on staging with sync on, verify, and test real order flows.
- Switch live with sync on, keep it on for at least a week, then turn it off.
- Clean up old data later, after a backup.
Want it done without the risk?#
We migrate WooCommerce stores to HPOS: plugin and code audits, fixes for custom code and integrations, staging tests and a live switch with a rollback plan. It’s a good job to book for January. See our WooCommerce development work or talk to a developer.