XF 1.5 Prune Admin Log, Moderator Log

Chris D

XenForo developer
Staff member
They aren't really supposed to be cleared (in that way), nor is there much benefit in doing so. They are pruned automatically.

If you absolutely have to prune them now, you could truncate/empty the xf_admin_log and xf_moderator_log table. (Take back ups first).


XenForo moderator
Staff member
You can set the moderator log length to 1 in the options which will prune it to 1 day (after running the daily clean up cron), then set it back to the previous value.


Well-known member
Where does one set the length of time for automatic pruning of the admin log?
I see options for moderator log and user change log (both set to 30 days) but my admin log goes back to 12/2015 so it's at >60 days right now

-edit: found it as a config.php option

$config['adminLogLength'] = 30;
The number of days to keep the log of all administrator activities in the admin control panel.
Last edited: