Simplify order management with Archiva for WooCommerce. Automatically archive old orders, WooCommerce Analytics and keep your WooCommerce admin clean, organized, and scalable over time.
Key Features
↑ Back to top- Automatically archive old WooCommerce orders based on age and status.
- Keep your active WooCommerce order tables smaller and easier to manage.
- Set different retention periods for regular, failed and canceled orders.
- Archive WooCommerce Analytics data separately from order data.
- Restore archived orders whenever you need them.
- Permanently remove old archived data when it is no longer required.
- Manage large archival jobs using WP-CLI.
Setup and Installation
↑ Back to top- Download the .zip file from WooCommerce Account
- Upload the Archiva plugin ZIP file from WordPress Dashboard > Plugins > Add New > Upload Plugin.
- Activate the plugin.
- Go to WooCommerce > Settings > Archiva > General and configure the archival settings.
- To enable automatic archival:
- Enable Archive WooCommerce Orders.
- Set Automatically archive orders received earlier than X days to your desired retention period. For example, enter
730to archive orders older than two years.
- Save your settings.
Once enabled, Archiva automatically archives eligible orders in the background. By default, the scheduled action runs every 12 hours and processes up to 50 orders per run.
The scheduled action frequency can be modified using the Archive Frequency (in hours) drop down.
For bulk archival, you can also use the Archiva WP-CLI commands.
WooCommerce Orders
↑ Back to topArchive orders based on order status
↑ Back to top- Go to WooCommerce > Settings > Archiva > General
- 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 top- 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.
Use the Bulk Actions > Unarchive action to unarchive multiple orders at once. If you wish to unarchive orders for a selected date range or by user email, use the WP-CLI unarchive command.
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 drop down or the Order Actions drop down found in the Edit Order page.
Manually delete archived orders
↑ Back to top- Go to WooCommerce > Archived Orders
- Identify the order to be deleted.
- Click on the Delete Permanently icon displayed in the Actions column.
Use the Bulk Actions > Permanently Delete action to delete multiple orders at once. If you wish to delete orders for a selected date range or by user email, use the WP-CLI delete command.
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.
WooCommerce Analytics
↑ Back to topArchiva can also archive WooCommerce Analytics data associated with your older orders. This helps reduce the amount of historical data retained in WooCommerce’s Analytics tables while keeping your older order data available in Archiva.
From version 1.8, Analytics archival can be configured separately from order archival, giving you control over how long WooCommerce Analytics data should remain in the active tables.
Analytics Settings
↑ Back to topFrom WooCommerce > Settings > Archiva > General, you can:
- Enable or disable Analytics data archival.
- Set the number of days after which Analytics data should be archived.
- Choose whether Analytics data should be retained for a different period from your WooCommerce orders.
Rebuild Archived Analytics
↑ Back to topIf Analytics data has been removed from WooCommerce’s active Analytics tables, Archiva can rebuild the Analytics data for archived orders when needed.
The rebuild feature lets you restore Analytics data for a selected period from your archived orders, making the data available again in WooCommerce Analytics.
You can rebuild analytics data by month from WooCommerce > Settings > Archiva > General > Historical Analytics section.
The Historical Analytics section will be displayed only if the plugin finds any archived Analytics data.
To rebuild analytics for specific orders or by a date range, use the WP-CLI rebuild command.
Archive Orders & Analytics using WP-CLI
↑ Back to topArchiva supports WP-CLI, enabling store owners and developers to perform multiple actions for WooCommerce orders & WooCommerce Analytics data directly from the command line. This is a link to the WP-CLI commands the plugin supports.
Manually archive old orders
↑ Back to top- 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 drop down.
- Click on the Update button.
Use the Bulk Actions > Move to Archive action to archive multiple orders from the WooCommerce > Orders listing 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.
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.
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 > Display
- 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.
WooCommerce Subscriptions Compatibility
↑ Back to topThis can be changed in WooCommerce > Settings > Archiva > Integrations > WooCommerce Subscriptions Integration
By default, Archiva only considers subscription renewal orders for archival when all the conditions are met.
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 > Cleanup > 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.
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 > Advanced > 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.
For any further queries, please feel free to reach out.