Note: archiving of WordPress activity log events is available in the premium edition of the WP Security Audit Log plugin.
By archiving events the main audit trail database remains small, manageable and fast. Once the events are archived in the archiving database they can still be viewed, searched through and be included in the reports. This article explains how to configure the archiving of WordPress activity log events.
How to Archive Events from the WordPress Audit Log
- Navigate to the DB & Integrations node in the plugin menu.
- Click on the Archiving tab.
- Configure how old events should be for them to be archived from the Archiving Options settings. You can specify a number of months or years.
- Configure the database connection details and the frequency of the archiving process.
- Click Save Changes to save the changes and start archiving alerts.
Use the Stop Archiving toggle switch to temporarily stop the archiving of events and the Execute Archiving Now button to trigger the archiving of alerts.
Configuring the WordPress activity log retention settings
Once you configure archiving the retention settings of the activity log are moved from the Activity Log settings to the Archiving settings, because the configured retention period applies to the archiving database. The Audit Log Retention settings are shown in the below screenshot.
Therefore it is important to re-configure the activity log retention settings once you enable archiving. The retention period should be longer than the archiving period. For example if the archiving period is set to one year, then the retention period should be set to something that is more than one year, otherwise the events will not be archived but will be purged instead.
Viewing the Audit Trail in the Archiving Database
Once you enable archiving and events from the WordPress security audit trail are archived, a drop down menu will be available in the Audit Log Viewer that allows you to select which database to view, as shown in the below screenshot.
Note that all the premium features, such as WordPress report and activity log search fully support the archiving database. Therefore when creating a report, or searching for specific activity, if there are events in the archiving database that match the criteria you will be alerted about it and can select to view such alerts as well, or include them in the reports.
Refer to the Database & Integration tools getting started guide for more information on the add-on and its other features.