1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Purge Admin and Mod Log

Discussion in 'XenForo Questions and Support' started by DRE, Sep 28, 2013.

  1. DRE

    DRE Well-Known Member

    How to do this?
  2. markku

    markku Well-Known Member

    I don't think it's possible via ACP. I don't know how trivial creating such an addon would be.

    You could use phpmyadmin or adminer or other web-based mysql management tool. Or if you have direct shell access, you can use mysql commands there.

    The tables are:

    Using phpMyAdmin, click the forum database on the left, then a list of tables comes up, click the tab "SQL", and enter the following commands:
    truncate table xf_admin_log;
    Execute the command
    truncate table xf_moderator_log;
    Execute the command

    If you have ssh access to your server, log in and you could do the following:
    mysql -u username -p databasename
    truncate table xf_admin_log;
    truncate table xf_moderator_log;

    Truncate empties the contents of the table but doesn't remove the table as opposed to drop. The end result should be that the admin and moderator logs are emptied. No guarantees though, and naturally always have recent backups available.
    DRE likes this.
  3. Brogan

    Brogan XenForo Moderator Staff Member

    The mod log length can be set to 1 day in Logging Options.

    Other than that, the only way to empty them is as markku has explained.

    I periodically truncate mine just to clear them out.
    Doing so does not affect data integrity.
    DRE likes this.

Share This Page