WordPress activity log: who changed what

Written by

in

The customer calls: “the site has changed and I haven’t touched anything”. Without a WordPress activity log the answer is a guess. With the plugin’s Activity log tab it is one line with a date, a user and an action.

WordPress activity log: a list of five rows joined by a vertical line, with one pink row highlighted

What goes into the WordPress activity log

Logins and logouts, failed logins, users created, deleted or given a different role, content published or deleted, comments, media, plugins and themes activated or updated, core updates, important settings, menus, widgets, file edits from the admin area, and exports. Each group in the WordPress activity log can be switched on and off independently.

Before and after, but no secrets

When a setting changes, in the plugin or in another plugin that uses the WordPress Settings API, the WordPress activity log shows the old value and the new one, only for the fields that really changed. If the option name suggests a secret (key, token, password, licence) the value is never stored. You know it changed, not what it became. A log that leaves the site must not carry along the very things it is meant to protect.

First on the site, then to the panel

Every event in the WordPress activity log is written immediately to the local database. If you have connected a panel, it is sent at the end of the request, after answering the visitor. The site never waits for the panel. If the panel is down the event stays in the queue and is retried. The daily clean-up only deletes events that have already been confirmed.

How much space it takes

The local log has a row cap, 500 by default. It also grows with anonymous requests such as failed logins and comments. Retention on the panel is a separate setting: shortening the local one does not touch the history already delivered. To decide what is worth logging, the OWASP Logging Cheat Sheet is a solid reference.

Touching the WordPress activity log leaves a trace too. Emptying it, deactivating or uninstalling the plugin are logged events. The plugin also tries to deliver the last entry to the panel before removing the data. That way you can tell a plugin removed on purpose from a site that has gone silent. The log never contains the text of a post, a comment or a file.

Frequently asked questions

Does the WordPress activity log store passwords or content?

No. It never records passwords or the content of posts, comments or files.

What happens if the panel cannot be reached?

Events stay in the queue on the site and are retried. The automatic clean-up only deletes the ones the panel has confirmed.

Does emptying the local log also delete the history on the panel?

No. The plugin does not send any delete command to the panel.

Read more

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

WordPress Cookie Notice by Real Cookie Banner