When something changes on a WordPress site, a deleted page, a new admin user or a plugin installed at 3am, the first question is who did it and when. Without an activity log, the answer is often a guess. A log records actions across the site, helping you troubleshoot mistakes, spot suspicious behaviour and investigate incidents. Here is how I use activity logs on client sites.
What an activity log records
Activity logs record user actions and system events: logins and failed logins, content created, edited and deleted, plugin and theme installs, activations and updates, settings changes, user creation and role changes, and, for stores, order and product changes.
Each entry shows the user, time, IP address and details of what changed, creating an audit trail of the site’s history.
Why it matters for security
Logs help detect compromises early: an administrator created by an unknown user, logins from unusual countries, plugins installed without explanation or files changed outside normal working hours. Alerts for these events let you respond quickly.
After an incident, logs show when the attack started and what the attacker did, which helps cleanup and prevents reinfection. See what to do when your WordPress site is hacked.
- New admin userImmediately
- Role changesTo administrator
- Plugin installsUnexpected
- URL or email changesSite settings
- Login spikesFailed attempts
- New countriesPrivileged logins
Why it matters for troubleshooting
Many problems are caused by changes: a plugin update, a setting changed by a colleague or a page edited by mistake. Logs show exactly what changed before the problem started, saving time diagnosing issues.
This is especially valuable on sites with several editors, agencies or freelancers making changes.
Accountability for teams
On sites with multiple users, logs show who made each change, which encourages careful work and helps resolve disputes. They work best when every person has their own account rather than sharing logins.
See WordPress user roles.
Choosing a plugin
Popular options include WP Activity Log, Simple History, Activity Log by Solid Security and the audit features in some security suites. Compare what they record, how they handle WooCommerce and other plugins, alert options, retention settings and storage.
WP Activity Log is detailed and supports many plugins; Simple History is lightweight and easy to read.
What to monitor closely
Set alerts for high-risk events: new administrator users, role changes to administrator, plugin and theme installations, changes to site URLs or admin email, failed login spikes and logins from new countries for privileged users.
Too many alerts lead to fatigue. Focus on events that should rarely happen.
WooCommerce activity
For stores, log changes to orders, refunds, coupons, products, prices and payment settings. These help detect internal mistakes, fraud and unauthorised changes. See WooCommerce security basics.
Check whether your chosen plugin supports WooCommerce events natively or through an add-on.
Storage and performance
Logs are usually stored in the database, which can grow large on busy sites. Set retention periods, such as 90 days or a year depending on needs, and archive or delete older entries. Some plugins can store logs externally.
Monitor database size and clean up as part of database optimisation.
Protecting the logs
Attackers with admin access may try to delete logs to hide their tracks. Some plugins send logs to external services or email, keeping a copy outside WordPress. Limit who can view and change log settings to administrators.
For high-risk sites, external log storage is worth the extra setup.
Privacy considerations
Logs contain personal data, such as usernames, IP addresses and actions. Mention activity logging in your privacy policy, limit access and set sensible retention periods. Avoid logging more personal data than necessary.
Server and hosting logs
Activity logs record actions within WordPress. Server access logs and error logs, available from your host, record every request and PHP error, which is useful for diagnosing attacks and performance problems. Use both together.
Ask your host how long server logs are kept and how to access them.
Reviewing logs regularly
Even with alerts, review logs periodically: weekly for busy sites, monthly for quieter ones. Look for unusual patterns, unknown users and unexpected changes. Include log reviews in monthly maintenance.
Regular review helps you understand normal activity, which makes unusual activity easier to spot.
Using logs during incidents
When something goes wrong, start by filtering the log to the time the problem appeared. Look for plugin updates, settings changes, new users and file edits shortly before. This often points straight to the cause, whether a mistake or an attack.
Export relevant log entries before making changes, as evidence for your host, developer or insurer if needed. After the incident, add alerts for the type of event that caused it so you hear about it sooner next time.
Getting help
I set up activity logs and alerts as part of my website protection service and review them during maintenance. For a security review, see my WordPress security audit.
For login monitoring, read brute force attack protection.
Key takeaways
- Activity logs show who changed what and when on your site.
- Set alerts for rare, high-risk events such as new administrators.
- Use logs to troubleshoot problems caused by recent changes.
- Set retention periods and protect logs from tampering.
Frequently asked questions
Do activity logs slow WordPress?
Well-built plugins have little impact. Set retention to keep the database lean.
Which activity log plugin is best?
WP Activity Log for detail and plugin support; Simple History for a lightweight option.
How long should I keep logs?
Typically 90 days to a year, depending on needs and regulations.
Can attackers delete logs?
Yes, with admin access. External log storage protects against this.
Do logs record changes by plugins?
Many log plugin updates and some plugin-specific events. Check coverage.
Are activity logs required by law?
Not generally, but they help meet security and accountability obligations.
Can I see who deleted a page?
Yes, if the activity log was active at the time. It records the user, time and the page deleted.
Do activity logs record visitor actions?
Usually only logged-in user actions and system events, not every page view by visitors.
