Mobile App Refresh Campaign [Banner] 2024

Product Icon


by  Woo
Sell online with the flexible, customizable eCommerce platform designed to grow with your business. From your first sale to millions in revenue, Woo is with you. See why merchants trust us to power 3.4 million online stores.

Auto Archive Old Orders

Since WordPress v6.1 the Site Health check has started recommending if you should be using a “Persistent Object Cache” without actually explaining why but on our site the reason is because …

We have more than 1,000 rows in wp_comments (11,152)
We have more than 1,000 rows in wp_posts (4,437)
Both of these are being caused by WooCommerce orders. The rows in wp_posts are mainly made up of the following post types …

shop_order: 4383
shop_order_refund: 31

… and the rows in wp_comments are attached to those posts.

We would like a feature to archive old (older than an year) orders to custom database tables so that they can still be viewed as normal but are no longer residing in the wp_posts and wp_comments table which is un-necessarily adding load to SQL queries to those tables in the database.

Ideally this would be undertaken by WP cron and would be silently undertaken in the background so that users are non-the-wiser.

We don’t believe that our shop is particularly busy and I’m sure there are sites with way more orders that would do well to have less rows in their wp_posts and wp_comments tables.



Current Status


Last updated: July 26, 2023


Log in to comment on this feature request.

  1. says:

    This is a great feature and it is a must! Also it will be great to be able to delete old Woocommerce tables after migrating to HPOS, since they stay there.

  2. imhakanarslan says:

    I believe this feature is absolutely necessary for WooCommerce.

  3. Monica Thomason says:

    Our site has almost 300,000 orders. I am trying to convince the owners to stay with woo because of the customization capabilities, but the lack of this function is killing us.

  4. KeithR says:

    This would be an excellent feature.

  5. audiolabwp says:

    Yes this would be a good feature. Please integrate and also you should add a partially shipped option too.

  6. nickfmc11 says:

    This has been killing us also, especially on sites with the subscription addon.

  7. markxkr says:

    Got the same problem – too many orders and using order back edn to find and view orders is painfully slow…

  8. brendondev says:

    Hell yes! I have spent weeks (on an off) looking at how to fix this for my damn website. We currently have 141,817 orders and no need to keep even 120,000 of those. Well, the problem is that we DO have a legal obligation to keep them for 7 years. But, right now, all they’re doing is massively slowing down the load time of our website – to the point that sometime when I try to load the WooCommerce > Orders page – Cloudflare times out entirely. (I’d say about 40% of the time)

    As far as I know, there’s no reliable nor stable way to actually archive the orders – This should 100% have been implemented by now. There’s no way it hasn’t come before now.

  9. maikunari0 says:

    Managing a site with a huge number of orders, the ability to archive orders and thus speed up the admin would be excellent.

  10. sarasteeleart says:

    DEFINITELY want the ability to archive past orders. I have a seasonal business, and this would be incredibly helpful. I would like it to be able to automatically show archived orders from current customers when they order in the current season.

  11. backshirt says:

    Also ich muss sagen das geht mir genauso. Ich frage mich wie Shops das machen die noch viel mehr Bestellungen haben als ich. Aktuell liegen ca. 400 abgeschlossene Bestellungen rum und es dauert ewig einen Auftrag zu suchen.

    Bitte sorgt für bessere Ladezeiten bei Woocommerce Aufträgen.

  12. mehrbanalicom says:

    Been trying to search for an official way to do this exact thing.

    The whole of our dashboard loads fine, but everytime we open up an order its takes a lot of time to load, after doing everything in our power, we realized that we have to reduce the number the size of the postmeta and post tabes.

    There are plugins out there that claim to do this, but they are very old and have not been updated for years. I wish this feature request picks up so there is an official option to archive orders.