Simplify order management by using Archiva for WooCommerce. The plugin automatically archives old WooCommerce orders for better performance and organization.
Key Features
↑ Back to top- Automatically archive old WooCommerce orders with no manual effort.
- Set it up once and let it work silently in the background.
- Archive orders based on order status and age.
- Use WP-CLI for fast, bulk archiving in developer workflows.
- Accelerate the cleanup of failed/canceled orders by setting shorter retention periods.
- Unarchive orders anytime you need them, hassle-free.
- Export archived orders in CSV or XML files for safekeeping and peace of mind.
- Display archived orders in My Account > Archived Orders page.
- Automatically delete archived orders after a secondary retention period to keep your database lean.
- Manually archive orders from WooCommerce > Orders page and Edit Order page.
Setup and Installation
↑ Back to top- Upload the plugin zip file from WordPress dashboard > Plugins page.
- Activate the plugin.
- Configure the plugin settings in WooCommerce > Settings >Archiva
- Archive WooCommerce Orders checkbox should be enabled for automated archival to begin.
- Set a value in Automatically archive orders received earlier than X days. For e.g. if you wish to archive orders received more than 2 years ago, set the value to 730.
- When left blanks or 0, no orders will be automatically archived.
- Archived Orders can be found in WooCommerce > Archived Orders.
- NOTE: The auto-archive scheduled action runs once every 12 hours by default and archives 50 orders in each cycle.
- If you wish to run the action more frequently, modify the Archive Frequency (in hours) setting as needed.
- Archive orders in bulk using the WP-CLI tool.
Archive orders based on order status
↑ Back to top- Go to WooCommerce > Settings > Archiva
- Enable Archive WooCommerce Orders
- Set a value in Automatically archive orders received earlier than X days. For e.g. if you wish to archive orders received more than 2 years ago, set the value to 730.
- Search and add all the order statuses that should be considered for archival in Order statuses to be archived
- When left blank, all orders will be archived based on the date received irrespective of the order status.
Cleanup failed/canceled orders faster
↑ Back to topArchive failed or canceled orders faster than regular ones.
For example, if regular orders are archived after 365 days, you can set failed or canceled orders to be archived after just 14 days using the “Automatically archive failed/canceled orders received earlier than X days” setting.
Unarchive an order
↑ Back to topUnarchive a single order
- Go to WooCommerce > Archived Orders
- Identify the order to be unarchived.
- Click on the Unarchive Order icon displayed in the Actions column.
- Go to WooCommerce > Orders. Check if the order is displayed fine.
Unarchive multiple orders at once
- Go to WooCommerce > Archived Orders
- Select the orders to be unarchived
- Go to Bulk Actions, select Unarchive order. Click on Apply.
- Go to WooCommerce > Orders. Check if the orders are displayed fine.
NOTE: Once an order is unarchived, it will not be archived automatically in the future auto archive actions. The admin/store manager will have to manually archive it using the WooCommerce > Orders > Bulk Actions dropdown or the Order Actions dropdown found in the Edit Order page.
Export archived order data to CSV and XML files
↑ Back to top- Go to WooCommerce > Archived Orders
- Click on Export to CSV or Export to XML button to export all the orders listed on the page.
- To export select orders based on a given customer, select the customer in the Filter by registered customer dropdown, click on Filter.
- Once filtered, click on the Export to CSV or Export to XML button on the page.
- To export select orders based on order status e.g. Completed, go to the Completed view and then click on the Export to CSV or Export to XML button on the page.
- NOTE: It may take some time for all the data to be exported based on the size, kindly do NOT close the page until the download file is generated.
- Once the file is generated, it will automatically be downloaded in the Downloads folder set up in the browser.
Manually archive old orders
↑ Back to topArchive a single order
- Go to WooCommerce > Orders
- Identify the order to be archived. Click on the order.
- Once on the Edit Order page, go to Order Actions
- Select Move to Archive in the dropdown.
- Click on the Update button.
Archive multiple orders
- Go to WooCommerce > Orders
- Select the orders to be archived.
- Select Move to Archive in the Bulk Actions dropdown.
- Click on Apply.
Archive orders using WP-CLI
↑ Back to topArchiva supports WP-CLI, enabling store owners and developers to archive, unarchive, inspect, list, and delete WooCommerce orders directly from the command line. This is a link to the WP-CLI commands the plugin supports.
Automatically delete archived orders
↑ Back to topDelete old archived orders after a secondary retention period to keep the database lean.
- Go to WooCommerce > Settings > Archiva > Clean-up archived orders
- Select Auto-delete archived orders and set a value in Automatically delete orders archived earlier than X days
- Save the settings.
If the value is set to 90 days, the plugin will automatically delete orders that were archived more than 90 days ago. The task is performed in a scheduled action. A backup copy of the deleted orders can be found in /wp-content/uploads/archiva/ folder.
Manually delete archived orders
↑ Back to topPermanently delete a single order
- Go to WooCommerce > Archived Orders
- Identify the order to be deleted.
- Click on the Unarchive Permanently icon displayed in the Actions column.
Permanently delete multiple orders at once
- Go to WooCommerce > Archived Orders
- Select the orders to be deleted
- Go to Bulk Actions, select Permanently delete archived orders. Click on Apply.
NOTE: Once an archived order is deleted, it cannot be retrieved/recovered. It is advisable to export the order data to CSV or XML files before deleting it.
Display Archived orders in My Account
↑ Back to topWhen orders are archived, they are no longer visible in the My Account > Orders page. In order to display the archived orders on the front end, the plugin creates a new page My Account > Archived Orders. Kindly follow the steps below to display the same.
- Go to WooCommerce > Settings > Archiva
- Select Display Archived Orders in My Account
- Save the settings
- Once orders are archived, the end user can find their archived order records in My Account > Archived Orders.
Delete plugin data on uninstall
↑ Back to topThe plugin moves WooCommerce order data from core WooCommerce/WordPress tables to custom plugin tables. By default, when the plugin is deactivated and deleted from the WordPress dashboard, the plugin data, i.e., the archived order tables, are not deleted.
The setting WooCommerce > Settings > Archiva > Plugin Uninstall Settings > Delete plugin data on uninstall is off/unchecked by default.
Kindly enable it only if you have a backup of the existing archived orders and are fine with losing the tables on uninstall. The deleted data cannot be restored.
When the setting is off and the plugin is deleted, simply reinstall the plugin again to access the archived order data in the WordPress dashboard. Alternatively, you can reach out to us to get a list of all the plugin table names to create a backup from the database.
HPOS Compatibility
↑ Back to topThe plugin is compatible with legacy order storage (post_type = ‘shop_order’) as well as High Performance Order storage system.
Since order data is stored in different formats in these systems, it is advisable to decide and retain only one method of storage before you start archiving the WooCommerce orders.
For any further queries, please feel free to reach out.