ThisCalculator

Everyday

WordPress Activity Log Setup: Step-by-Step Guide

Updated · Standard formula, shown below

Setting up an activity log on your WordPress site gives you a clear record of every change made by users, plugins, and the system itself. This guide walks you through installing and configuring a logging plugin, understanding what gets tracked, and keeping the log useful without slowing down your site. You’ll need admin access to your WordPress dashboard and the ability to install plugins.

What You’ll Need

  • Administrator access to your WordPress dashboard.
  • A WordPress site running a current version (5.0 or newer is recommended).
  • FTP or file manager access (only for manual troubleshooting, not required for the basic setup).

Step-by-Step

  1. Back up your site. Before installing any new plugin, create a full backup of your database and files. Many hosting providers offer one-click backups, or you can use a backup plugin. This ensures you can restore your site if something goes wrong.
  2. Choose an activity log plugin. The most popular free option is “WP Activity Log” (by WP White Security). Other good choices include “Simple History” and “Activity Log”. For this guide, we’ll use WP Activity Log because it offers detailed tracking and a clean interface.
  3. Install the plugin. In your WordPress admin, go to Plugins → Add New. Search for “WP Activity Log”. Find the plugin by WP White Security, click Install Now, then Activate.
  4. Run the setup wizard. After activation, a setup wizard will appear. Click Start Setup. The wizard asks a few questions about your site type and privacy preferences. Choose the options that fit your needs—for most sites, the defaults are fine. Click Continue through the steps until you reach the finish.
  5. Review the default log. Once the wizard finishes, go to WP Activity Log → Log Viewer in your admin menu. You’ll see a list of events with columns for date/time, user, IP address, and a description of what happened. This is your activity log.
  6. Understand what’s being tracked. By default, the plugin logs: post/page creation, edits, and deletions; user logins and logouts; plugin and theme installations, activations, and updates; settings changes; and file uploads. It does not log every page view or visitor—that’s a separate type of analytics.
  7. Customize the log settings. Go to WP Activity Log → Settings. Here you can:
    • Set how long to keep log entries (default is 6 months).
    • Choose which user roles to track (e.g., exclude subscribers).
    • Select specific event types to record (e.g., only logins and content changes).
    • Enable email notifications for critical events like failed logins or plugin changes.
  8. Set up external storage (optional but recommended). If your site is hacked, the attacker might delete the log. To prevent this, store logs off-site. In Settings → External DB, you can connect to a separate MySQL database. This requires creating a database and user in your hosting control panel. If that sounds complex, you can skip it initially.
  9. Test the log. Log out of your site and log back in. Then create a test post and edit it. Check the Log Viewer—you should see entries for your login and the post creation/editing. This confirms everything is working.
  10. Monitor regularly. Make it a habit to review the log weekly. Look for unusual activity, such as failed login attempts, new admin users, or unexpected plugin changes. If you spot something suspicious, investigate immediately.

Common Mistakes

  • Not configuring retention. Leaving the default retention (6 months) can fill up your database with thousands of rows, slowing down your site. Reduce it to 30-60 days if you don’t need long history.
  • Logging too many events. Tracking every minor setting change can bloat the log and make it hard to find important events. Use the “Event Types” filter to uncheck trivial actions like “viewed” or “updated” for non-critical items.
  • Ignoring privacy settings. The plugin may log IP addresses, which is personal data under GDPR. Make sure you have a privacy policy that mentions this, and consider disabling IP logging if not needed.
  • Not testing after setup. Many users assume the log works without checking. Always test with a few actions to verify the plugin is capturing events.

Tips

  • Use the search and filters. The Log Viewer has a search box and filters for date range, user, and event type. Use them to quickly find specific incidents.
  • Enable email alerts for critical events. In Settings → Notifications, add an email address to receive alerts for failed logins, plugin activation, or user role changes. This helps you react in real time.
  • Integrate with a security plugin. An activity log complements a security plugin like Wordfence. The log tells you what happened; the security plugin can block threats.
  • Keep the plugin updated. Like all plugins, activity log plugins receive updates for security and new WordPress versions. Enable auto-updates for this plugin in your plugins list.

Troubleshooting

  • Log is empty or not recording events. Check that the plugin is active. Go to WP Activity Log → Settings and ensure “Enable activity log” is checked. Also, verify that the user role you’re testing with isn’t excluded. If you’re testing as an administrator, that role is always tracked by default.
  • Plugin conflicts. If the log stops working after installing another plugin, deactivate the new plugin and test again. If the log resumes, there’s a conflict. Contact the other plugin’s support.
  • Database size grows too fast. Reduce the retention period in settings. Also, use the “Delete Logs” button in the Log Viewer to manually clear old entries.
  • Email notifications not sending. Check your WordPress email settings. The plugin uses wp_mail() which may fail if your server’s mail function is misconfigured. Install an SMTP plugin like WP Mail SMTP to fix email delivery.
  • After a site migration, the log shows old data. That’s expected—the log is stored in the database. If you want a fresh start, clear the log after migration.

Frequently Asked Questions

Does an activity log slow down my website?

It can if you keep unlimited log entries. The plugin writes a small database row for each event. With default retention (6 months) and typical traffic, the impact is negligible. Reduce retention to 30 days for high-traffic sites.

Can I see who deleted a post?

Yes. The log records the username and IP address for post deletions. Look for the event type “Post deleted” in the Log Viewer.

Will the log capture failed login attempts?

Yes, if you enable that event type. In Settings, under “Event Types”, make sure “Failed login” is checked. You can also set up email alerts for multiple failed attempts.

Can I export the activity log?

Yes. In the Log Viewer, click the “Export” button to download a CSV file of the current log entries. This is useful for auditing or sharing with your team.

Is it possible to hide the activity log from other admins?

Yes. In Settings → Privileges, you can restrict access to the log viewer to specific user roles. For example, you can allow only administrators to see the log, and even exclude certain administrators if needed.

What happens if the log gets too large?

When the log reaches the retention limit, the plugin automatically deletes the oldest entries. If you need to keep everything, increase the retention period or set up external database storage to avoid bloating your main database.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.