r/WordpressPlugins • u/Nico-Salinas • 1h ago
Free [FREE] I built a free plugin to archive old WooCommerce orders, because the orders page and search get unusable past ~100k orders
On stores with tens or hundreds of thousands of orders, the WooCommerce orders screen gets slow and order search can time out completely. Most of those orders are years old and nobody opens them. "Auto-archive old orders" has been one of the most requested features on the WooCommerce feature request board since 2023, and it's still not in core.
OrderArc moves old orders (completed/cancelled/refunded, older than X days, 365 by default) into separate archive tables in your own database. The orders screen and search only see recent orders, so they're fast again.
What I cared most about, since it touches someone else's business data:
- Each batch runs in one database transaction. Before deleting anything from the live tables it checks that the copy has the same row count and the same checksum on every column. If anything differs, the batch is rolled back.
- It moves every row of an order (items, meta, notes, refunds, addresses, the legacy
wp_postscopy, and per-order rows other plugins add). - It doesn't go through the WooCommerce order API to move orders, so no emails go out, stock isn't touched and no "order deleted" hooks fire.
- Analytics/reports keep counting archived orders.
- Archived orders are searchable, viewable and restorable with one click. Customers still see them under "Older orders" in My Account.
- Subscription renewal orders are never archived.
- Works with HPOS (with or without sync) and legacy storage. Runs in the background at night with Action Scheduler.
- Nothing leaves your server.
The screenshot is from a demo store with about 100k generated orders: after archiving, a real order search takes 0.2 s.
https://wordpress.org/plugins/orderarc/
Disclosure: I built it. If you run a store with a big order table and can test it on a staging copy, I'd really like to hear how it goes.