Something changed on the site. A plugin is off, a page is gone, the checkout looks different, there is an administrator nobody recognises. The first question is always the same: who did this, and when?
Without a log, the answer is guesswork and a round of emails. With one, it takes a minute.
What an activity log records
An activity log keeps a list of changes made in wp-admin: what changed, who did it, from which IP address, and when. The most useful events are:
- plugins and themes installed, activated, deactivated, updated or deleted;
- WordPress updates;
- users added or deleted, role changes and password changes;
- important settings changed;
- content deleted.
On sites with several editors, logins, published and edited content, media uploads, menus and comment moderation are useful too.
What it is good for
Fixing problems faster
“The site broke this morning” becomes “a plugin was updated at 08:12”. You know where to look, and what to roll back.
Spotting a break-in
Attackers who get in usually do a few telling things quickly: create an administrator, install a plugin, change a setting. In a log, these stand out, especially when they happen at 3 in the morning from an unknown address.
Working with a team or clients
When several people manage a site, a log settles questions without blame. It also shows clients what was done for them.
Setting it up with Keel
In Keel › Monitoring › Activity log, switch on Record admin activity. It keeps the last 500 events: plugin and theme changes, WordPress updates, users, roles and passwords, important settings and deleted content. This is in the free version.
With Keel Pro, Also record logins, content, media, menus and comments adds the everyday events for busy sites.
Two related settings are worth switching on at the same time: email alerts for logins from new devices, and for new administrators. See Login alerts.
How long to keep it
Logs contain IP addresses and usernames, which are personal data under the GDPR. Keep them as long as they are useful, and no longer. A common setup:
- anonymise IP addresses after 30 days;
- delete entries after 90 days.
Both are in Monitoring › Logs & privacy. Mention security logging in your privacy policy.
A log is only useful if someone reads it
- Look at it after every unexpected change.
- Skim it once a month, as part of regular maintenance.
- Read Keel’s weekly email: it is a good moment to open the log as well.
Common questions
Does an activity log slow down the site?
A well-built one writes a small row only when something changes in wp-admin, so visitors do not notice it.
Can an attacker delete the log?
An attacker with full administrator access can change almost anything on a site. Alerts sent by email at the moment of the change are harder to erase, which is why logs and alerts work best together.
Do I need consent to log administrators?
Security logging is usually covered by legitimate interest under the GDPR. Mention it in your privacy policy and keep entries only as long as needed.