Fix WooCommerce HPOS “Table ‘wp_wc_orders’ doesn’t exist” (Without Breaking Orders)

When you see “WordPress database error: Table ‘wp_wc_orders’ doesn’t exist”, WooCommerce isn’t saying your orders are gone. It’s saying:

“High-Performance Order Storage (HPOS) is trying to use its order table, but that table isn’t in this database.”

This usually happens right after you enable HPOS, clone/migrate a site, or when a plugin assumes HPOS tables exist before WooCommerce has created them. Below, we’ll walk through how to confirm HPOS status, create the missing tables safely, and fix common edge cases—without nuking your existing orders.

WooCommerce HPOS is throwing “WordPress database error: Table 'wp_wc_orders' doesn’t exist” in my logs. How do I fix this without breaking existing orders?

What this error really means

This isn’t a generic database crash. It’s HPOS (High-Performance Order Storage) trying to query its main order table wp_wc_orders and MySQL replying:

“That table doesn’t exist in this database.”

In HPOS, WooCommerce stores orders in dedicated tables like wp_wc_orders, wp_wc_order_addresses, wp_wc_order_operational_data, and wp_wc_orders_meta instead of wp_posts and wp_postmeta. If those HPOS tables aren’t there—or a plugin is querying the wrong database/prefix—you get this exact error.

Most of the time, one of these is true:

  • You enabled HPOS, but WooCommerce never created the HPOS tables (or creation failed).
  • You cloned/migrated the site and HPOS tables weren’t copied or the table prefix changed.
  • HPOS is off, but a plugin or custom code is still querying wp_wc_orders directly.
  • You’re on an older WooCommerce version with an HPOS-related bug when enabling the feature.

Let’s go through those in a safe order.

Step 1: Confirm HPOS status and WooCommerce version

First, make sure HPOS is actually involved.

Check if HPOS is enabled

  1. Go to WooCommerce → Settings → Advanced → Features.
  2. Find the Order data storage / High-Performance Order Storage (HPOS) section.
  3. Note whether:
    • HPOS is enabled (possibly with compatibility mode), or
    • You’re still using the classic posts/postmeta storage.

If HPOS is enabled: the error is almost certainly coming from HPOS itself or HPOS-aware extensions trying to use wp_wc_orders. Keep reading.

If HPOS is disabled: some plugin or custom code is querying wp_wc_orders directly even though HPOS is off. You’ll fix that in the plugin conflict section.

Update WooCommerce before anything else

If you recently toggled HPOS and immediately started seeing the error, start here:

  • Go to Dashboard → Updates.
  • Update to the latest WooCommerce release.

Early HPOS builds (around the 7.x era) had bugs where enabling HPOS could trigger wp_wc_orders queries before the table was created. That’s been fixed in current releases, and updating often clears this class of error on its own.

Step 2: Check whether the HPOS tables actually exist

Next, find out if wp_wc_orders and its friends are in your database at all.

Option A: Check from WooCommerce Status

  1. Go to WooCommerce → Status.
  2. Scroll to the Database / Database tables section.
  3. Look for rows starting with your prefix, like:
    • wp_wc_orders
    • wp_wc_order_addresses
    • wp_wc_order_operational_data
    • wp_wc_orders_meta

Option B: Check via phpMyAdmin (or similar)

  1. Open your database manager (e.g. phpMyAdmin, Adminer, or your host’s DB tool).
  2. Select the same database your WordPress install uses.
  3. Search for tables named (with your prefix):
    • wp_wc_orders
    • wp_wc_order_addresses
    • wp_wc_order_operational_data
    • wp_wc_orders_meta

Now match what you see to one of these scenarios:

Step 3: Create missing HPOS tables safely

If wp_wc_orders (and possibly the other HPOS tables) simply isn’t there, WooCommerce has never successfully created them—or they were dropped during a migration.

3.1 Make sure your DB user can create tables

WooCommerce can’t create HPOS tables if your database user doesn’t have the right permissions.

  • In your hosting panel, confirm the DB user has CREATE and ALTER privileges for this database.
  • If you’re not sure, ask your host: “Can you confirm my WordPress DB user has permission to create and alter tables for HPOS?”

3.2 Re-run WooCommerce’s database update

Next, ask WooCommerce to run its own schema installer again.

  1. Go to WooCommerce → Status → Tools.
  2. Look for an option like Update database or Verify database and click Update.
  3. Wait for the process to finish, then refresh the Status → Database section and check if the wp_wc_* tables now appear.

If you’re comfortable with WP-CLI and your host allows it, you can also use the HPOS CLI tools to inspect and manage HPOS state from the command line. See WooCommerce’s HPOS CLI tools for details.

3.3 Deactivate / reactivate WooCommerce (as a last resort)

If HPOS tables still don’t get created and this is a staging/dev environment, you can sometimes nudge WooCommerce’s installer like this:

  1. Go to Plugins → Installed Plugins.
  2. Deactivate WooCommerce.
  3. Reactivate it.
  4. When prompted to run database updates, click Run the updater.

Important: always have a full database backup before doing this on production. Re-installing WooCommerce normally does not drop your order data, but you don’t want to discover an edge case the hard way.

After the update/reactivation, check again for the HPOS tables. If they now exist but you still see the error, move on to clone/prefix checks.

Step 4: Fix clone, prefix, or environment mismatches

If all the HPOS tables exist, but WordPress still logs Table 'wp_wc_orders' doesn’t exist, look closely at the database name and prefix shown in the error.

Common gotchas:

  • You cloned a site to staging but didn’t copy the HPOS tables along with everything else.
  • You changed your table prefix (e.g. from wp_ to wp123_) but queries still point at the old one.
  • Your wp-config.php is pointing to a different database than the one that actually has the HPOS tables.

Do this:

  1. Look at the exact error text. Note the database and prefix it mentions (e.g. dbname.wp_wc_orders).
  2. In your DB manager, confirm that:
    • You’re looking at the same database as in wp-config.php (DB_NAME), and
    • There is a table named DB_PREFIX . 'wc_orders' (e.g. wp_wc_orders, wp123_wc_orders).
  3. If the error mentions wp_wc_orders but your real prefix is different (e.g. wp7x_):
    • Check $table_prefix in wp-config.php.
    • Confirm WooCommerce is using the current prefix and that HPOS tables were created with that prefix.
    • Fix any custom code or hard-coded SQL that still refers to wp_wc_orders instead of using $wpdb->prefix . 'wc_orders'.
  4. If you cloned a site:
    • Make sure the HPOS tables (_wc_orders, _wc_order_addresses, _wc_order_operational_data, _wc_orders_meta) were included in the export/import.
    • If not, re-export just those tables from the source site and import them into the destination database with the same prefix.

Step 5: If HPOS is off, or a plugin is still querying wp_wc_orders

It’s also possible that HPOS is disabled, but a plugin or custom code is querying HPOS tables directly anyway.

Spot which code is making the query

  1. Open WooCommerce → Status → Logs.
  2. Look for today’s log that mentions fatal errors or database errors.
  3. Scroll to the stack trace around Table 'wp_wc_orders' doesn’t exist.
  4. Note the plugin folder, theme, or custom code mentioned just before WooCommerce core files in the trace.

Once you know who’s querying the table:

  • Update that plugin/theme to the latest version (many vendors have shipped HPOS-safe updates).
  • Check the plugin’s docs or changelog for HPOS compatibility.
  • If the plugin is HPOS-aware but HPOS is disabled:
    • Either enable HPOS properly and run the migration, or
    • Contact the vendor and report that it’s querying HPOS tables when HPOS is off.
  • Temporarily deactivate any suspicious plugin, then reload the Orders page and your logs to see if the error disappears.

If the error only appears with one specific extension active, you’ve found the culprit—even if it still needs a vendor fix.

If you can’t pin it down…

At this point, if you’ve:

  • Updated WooCommerce,
  • Verified HPOS status,
  • Checked that HPOS tables exist in the right database/prefix, and
  • Looked for obvious plugin stack traces,

…and you still see Table 'wp_wc_orders' doesn’t exist, I’ll need more context to help you safely.

Scroll down, click Continue Chat, and send me:

  1. A copy-paste of the full error line (including database name and prefix).
  2. Whether HPOS is On, Off, or in Compatibility mode (from WooCommerce → Settings → Advanced → Features).
  3. Your current WooCommerce version and WordPress version (from WooCommerce → Status).
  4. Whether this is live, staging, or a recent clone of another site.
  5. The part of the stack trace that shows which plugin/theme file fired the query.

Verification: how to know you fixed it

You’re in good shape when:

  • There is a single set of HPOS tables (with the correct prefix) in the right database.
  • Loading the Orders screen or running a test checkout no longer logs Table 'wp_wc_orders' doesn’t exist.
  • If HPOS is enabled, new orders appear in both the admin and in the HPOS tables.
  • If HPOS is disabled, nothing on your site is querying wp_wc_orders directly.

Still stuck?

For AI help

Hit Continue Chat below and I’ll help you interpret your logs, check HPOS status, and decide whether to repair, migrate, or temporarily roll HPOS back on your specific site.

For expert human help

Scroll down to the contact form below. Enter your name, email, and WordPress needs. Atiba will get back to you as soon as possible.

Need human WordPress help?

WP Assistant is a free tool created by Atiba Software, a WordPress design and development company located in Nashville, TN. If you need more personalized WordPress assistance let us know, and we’ll get back to you ASAP!