• Resolved luketapis

    (@luketapis)


    Hi. 

    For the past 3 days, I have been having problems with the database that stores all orders.

    1. Different browsers show different recent orders = on Mozilla, the last order is from 3 days ago, on Chrome from 1 day ago. In both cases, it looks as if time has stopped and for several days it shows that the last order was made a few minutes ago.

    Of course, I cleared all cookies and cache, but that didn't help.

    2. Most of my orders (98%) are virtual/downloadable orders, so they are immediately/automatically marked as completed. ‘Completed’ and ‘All’ should be more or less the same, but they are not.

    3. In the Dashboard - ‘Pending’ shows me that I have 5 orders, but when I go to the ‘Pending’ tab, there are 2 orders there. When I try to mark them as completed, I get the error: 'The link you followed has expired. Please try again.'

    What I have done so far:

    a. using WP-Optimize 4.3.1

    - Optimized database tables

    - Purged caches

    b. I deactivated all plugins except woocomerce + elementor

    c. I deleted caches + cookies from browsers.

    Nothing helped.

    I think I have an error in the database that stores all orders. A few years ago, I had the same problem and it turned out that after deleting one order, everything returned to normal.

    What further steps can I take?
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @luketapis,

    Thanks for explaining the issue so clearly. The behavior you are seeing usually points to a database inconsistency in the order tables, not a caching problem.

    Here are the next steps to try:

    1. Go to WooCommerce → Status → Tools and run these tools one by one:
    • Update WooCommerce database
    • Clear WooCommerce transients
    • Regenerate product lookup tables
    • Clear customer sessions
       
    1. Check your database tables in phpMyAdmin. In your hosting panel, open phpMyAdmin, select your site’s database, and run a table check. Pay attention to wp_posts, wp_postmeta, wp_woocommerce_order_items, wp_woocommerce_order_itemmeta, and any wp_wc_orders tables if HPOS is active. If any table shows warnings like “crashed” or “needs repair”, repair it.
    2. Check whether HPOS (High-Performance Order Storage) is enabled. Go to WooCommerce → Settings → Advanced → Features. If HPOS is turned on and some plugins are not compatible, you can get mismatched order views. Try disabling it temporarily.
    3. The “link you followed has expired” message often comes from nonces being cached or timing issues. Make sure your server time is correct and ensure no caching plugin or server-level cache is applied to the admin area. Also, check security plugins like WordFence or iThemes.
    4. Since you mentioned a similar issue was fixed earlier by deleting a single corrupted order, try identifying the last order that appears incorrectly, duplicate it, then delete the original. After that, clear WooCommerce transients again.
    5. Check WooCommerce logs under WooCommerce → Status → Logs. Look for any database or order-related warnings.

    If the issue continues, please share the WooCommerce System Status Report, whether HPOS is enabled, your hosting type, and whether any plugins or themes were updated before the issue started. That will help narrow it down.

    Let us know how it goes.

    Thread Starter luketapis

    (@luketapis)

    Thank you for your suggestions. I did those things, but unfortunately, it didn’t help.

    1. Go to WooCommerce → Status → Tools and run these tools one by one:
    • Update WooCommerce database
    • Clear WooCommerce transients
    • Regenerate product lookup tables
    • Clear customer sessions

    Next, I checked the tables: If any table shows warnings like “crashed” or “needs repair,” repair it. But no tables were corrupted.

    Next, I checked ‘Order Data Storage’. This is where something finally started happening. When I clicked ‘enable compatibility modes,’ all my orders in the ALL category were updated correctly. Additionally, in the Orders tab: Processing (2), I see the number (2), which is correct because I have two orders that are not yet processed and complete. Unfortunately, when I click the Processing (2) tab on the orders page, four orders appear that I had long ago unchecked as completed. I can now uncheck them as completed, and they will be completed for a short time, but after a while, they reappear as processing.

    It also doesn’t matter whether I have ‘WordPress’ or ‘HPOS’ selected. The same strange things happen in both cases.

    Do you have any suggestions on what I should do now?

    Thread Starter luketapis

    (@luketapis)

    This is the pic of my settings:

    https://ibb.co/zhWW3d83

    Plugin Support Frank Remmy (woo-hc)

    (@frankremmy)

    Hi @luketapis,

    Thanks for the detailed follow-up and for sharing your settings screenshot. That’s incredibly helpful.

    It’s promising that enabling compatibility mode helped synchronize the “All” orders view, and that the Processing count now reflects the correct number. The lingering issue with previously completed orders reappearing as “Processing” suggests there may still be residual data inconsistencies or a mismatch between HPOS and legacy storage.

    Here are a few steps to try next:

    1. Since the issue persists regardless of whether HPOS is enabled, it’s worth double-checking plugin compatibility. Some plugins may not fully support HPOS and could be reintroducing order status mismatches. You can find the compatibility list here.
    2. For the orders that keep flipping back to “Processing,” open each one and check:
      • If any metadata (e.g. _order_status, _completed_date) looks inconsistent (in the database).
      • Whether any custom code, webhook, or plugin might be modifying order status post-completion.
    3. As you mentioned this helped in the past, try duplicating one of the problematic orders, then deleting the original. After that, clear WooCommerce transients again and monitor if the issue resolves.
    4. Go to , did you see any entries related to order status changes, HPOS sync, or database errors in WooCommerce → Status → Logs when you checked?
    5. If the issue continues and compatibility checks don’t reveal a culprit, try disabling HPOS entirely for a short period to see if the legacy system stabilizes order status.

    Let us know what you find, and thank you again for your persistence and clarity.

    Plugin Support thelmachido a11n

    (@thelmachido)

    It’s been a while since we heard back from you for this reason we are closing this thread. 

    If WooCommerce has been useful for your store and you appreciate the support you’ve received, we’d truly appreciate it if you could leave us a quick review here: 

     https://ww.wp.xz.cn/support/plugin/woocommerce/reviews/#new-post 

    Feel free to open a new forum topic if you run into any other problem. 

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘problems with the database that stores all orders.’ is closed to new replies.