Product Icon

WooCommerce

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.

Author

webdcouk

Current Status

In Progress

Last updated: October 15, 2024

20 comments

Log in to comment on this feature request.

  1. daretothinkuk says:

    Really need this feature. I’m getting to the point where I’m going to create a duplicate of the live site to store old orders. The site has 125,000 orders going as far back as 2014. Some way to auto archive orders that are X years old would be ideal.

  2. pisang20 says:

    Same issue.

  3. stuartkeasley says:

    Another vote for this feature, it would be good to understand when it may be released

  4. fatihag03f88df1eb says:

    There are over 900,000 orders on my site, and this issue has now noticeably increased. When is this feature planned to be released?

  5. maks86gmailcom says:

    This update is absolutely essential! My online store has over 15,000 orders, and I also use custom order statuses (https://wordpress.org/plugins/bp-custom-order-status-for-woocommerce/), as it’s impossible to manage orders efficiently without them.

    However, all of this is causing a significant slowdown in the system, impacting both the frontend and backend performance. This issue needs to be addressed urgently.

  6. Maarten says:

    This feature is absolutely and urgently necessary. Successful WooCommerce shops are currently forced to replatform due to too many orders in the database, causing performance degradation. Archiving orders is a must to enable continued business success.

  7. Jurassic says:

    I couldn’t agree more. Woocommerce does not scale well. We have around 100.000 orders in the database. I wouldn’t call this a really large shop. The postmeta table has more than 8 million rows which results in a database of more than 3,5 GB. Some features can’t be enabled without ruining the performance. The dashboard is miserably slow. No, our installation is not bloated at all. Each and every plugin is meticulously chosen. The theme is super lightweight. Of course, we don’t use a page builder. Tests have clearly shown that the issue is Woocommerce.

  8. webmakers.biz 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.

  9. imhakanarslan says:

    I believe this feature is absolutely necessary for WooCommerce.

  10. 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.

  11. KeithR says:

    This would be an excellent feature.

  12. audiolabwp says:

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

  13. nickfmc11 says:

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

  14. markxkr says:

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

  15. 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.

  16. 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.

  17. 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.

  18. 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.

  19. 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.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.