The Activity Log provides comprehensive tracking of security events, user actions, and system changes on your WordPress site. It’s essential for security monitoring, compliance, troubleshooting, and understanding what’s happening on your site.
What is Logged?
Guard Dog tracks five categories of events:
1. Security Events
Login attempts, authentications failures, lockouts, and security-related actions.
Examples:
- Login successful/failed
- 2FA enabled/disabled
- CAPTCHA verification
- IP address blocked
- Login lockouts initiated
- Password resets
2. User Management
User account creation, modifications, deletions, and role changes.
Examples:
- User created/deleted
- User role changed
- Profile updated
- Temporary access created/used
3. Content Management
Post, page, and comment activities.
Examples:
- Post created/updated/deleted
- Post status changed
- Post trashed
- Comment created/approved/deleted
- Comment marked as spam
4. System Events
Plugin, theme, and WordPress core changes.
Examples:
- Plugin activated/deactivated
- Plugin installed/deleted
- Theme switched/installed/deleted
- WordPress core updated
- Settings updated
- Menu/widget changes
5. WooCommerce Events (if installed)
E-commerce activities for sites using WooCommerce.
Examples:
- Product created/updated/deleted
- Order created/completed/refunded
- Coupon created/deleted
- Payment gateway changes
- Shipping zone updates
- Tax rate changes
Accessing the Activity Log
Navigate to Guard Dog → Activity Log in your WordPress admin.
Understanding the Activity Log Interface
Log Entry Columns
Each log entry displays:
Event Type:
- The name of the event (e.g., “Login Successful”, “Post Created”)
- Color-coded by category
User:
- Who performed the action
- “System” for automated actions
- “Guest” for unauthenticated actions
IP Address:
- Where the action originated from
- Helpful for tracking location of logins
Date/Time:
- When the event occurred
- Displayed in your WordPress timezone
Details:
- Additional context about the event
- Varies by event type
- Click to expand for full details
Filtering Events
Use filters to find specific events:
By Event Type:
- Select from dropdown of all event types
- Shows only matching events
By User:
- Filter by specific WordPress user
- See all actions by that user
By Date Range:
- Custom date ranges
- Today, Last 7 days, Last 30 days
- Custom start/end dates
By IP Address:
- Search for specific IP
- Track actions from a particular source
Combine filters:
- Use multiple filters together
- Example: Failed logins from specific IP in last 24 hours
Sorting
Click column headers to sort:
- Date/Time: Newest first (default) or oldest first
- Event Type: Alphabetically
- User: Alphabetically
- IP Address: Numerically
Pagination
Navigate through entries:
- Shows 25 entries per page (adjustable)
- Use page numbers or next/previous
- Jump to specific page
Configuring Activity Log
Choosing What to Log
- Go to Guard Dog → Activity Log
- Click “Event Settings” or “Configure Events”
- Check/uncheck event types you want to log
- Click Save Settings
Default logged events:
- All security events: ✅ Enabled
- User management: ✅ Enabled (except profile updates)
- Content creation/deletion: ✅ Enabled
- Content updates: ❌ Disabled (too verbose)
- System changes: ✅ Enabled (critical only)
- WooCommerce: ✅ Enabled (critical only)
Recommendations by Site Type
Personal Blog:
✅ Security events (all)
✅ User management
❌ Content updates (too noisy)
✅ Post creation/deletion only
✅ System changes
Business Website:
✅ Security events (all)
✅ User management (all)
✅ Content management (all)
✅ System changes (all)
❌ WooCommerce updates (unless needed for compliance)
E-commerce Site:
✅ All security events
✅ All user events
✅ All WooCommerce events
✅ All system changes
✅ Content creation/deletion
❌ Post/product updates (too verbose unless compliance requires)
High-Traffic Site:
✅ Security events only
❌ Content events (too much data)
✅ System changes
✅ User management (critical only)
Common Use Cases
Security Monitoring
Detecting attacks:
- Filter by event type: “Login Failed”
- Look for patterns:
- Many failures from same IP
- Failures with different usernames from same IP
- Geographic anomalies
- Add attacking IPs to blacklist
Investigating unauthorized access:
- Filter by event: “Login Successful”
- Check unexpected login times
- Verify IP addresses match expected locations
- Look for role changes or suspicious activity after login
Monitoring 2FA:
- Filter by “2FA” events
- Track who’s enabling/disabling 2FA
- Monitor 2FA failures (possible account takeover attempts)
Compliance & Auditing
User activity audits:
- Filter by specific user
- Review all their actions
- Export for compliance documentation
Change tracking:
- Filter by “Settings Updated” or “Plugin Activated”
- Track who made configuration changes
- Correlate changes with incidents
WooCommerce compliance:
- Filter by WooCommerce events
- Track order modifications
- Monitor refunds and sensitive operations
Troubleshooting
Plugin conflicts:
- Filter by “Plugin Activated”
- Note time of activation
- Correlate with reported issues
Mysterious content changes:
- Filter by user who modified content
- Check IP address
- Verify it’s legitimate user or compromised account
Lost password requests:
- Filter by “Password Reset”
- Verify legitimacy
- Check IP address for suspicious patterns
Event Details
Security Events
Login Successful:
User: john
IP: 203.0.113.50
Details: Login method: Standard (or 2FA, CAPTCHA+2FA)
Login Failed:
User: admin (attempted)
IP: 198.51.100.10
Details: Reason: Incorrect password
Login Lockout Initiated:
User: N/A
IP: 198.51.100.10
Details: Max retries: 5, Lockout expires: 2024-10-23 15:30:00
2FA Enabled:
User: mary
IP: 203.0.113.100
Details: Method: TOTP (Authenticator App)
User Management Events
User Created:
User: admin (creator)
IP: 203.0.113.50
Details: New user: newuser, Role: Editor
User Role Changed:
User: admin
IP: 203.0.113.50
Details: User: john, Old role: Editor, New role: Administrator
Temporary Access Created:
User: admin
IP: 203.0.113.50
Details: Temporary user: temp_support, Expires: 2024-10-30, Role: Editor
Content Management Events
Post Created:
User: editor
IP: 203.0.113.75
Details: Post ID: 123, Title: "New Blog Post", Type: post
Post Status Changed:
User: editor
IP: 203.0.113.75
Details: Post: "New Blog Post", Old status: draft, New status: published
System Events
Plugin Activated:
User: admin
IP: 203.0.113.50
Details: Plugin: contact-form-7/wp-contact-form-7.php
WordPress Core Updated:
User: admin
IP: 203.0.113.50
Details: Old version: 6.3.1, New version: 6.3.2
WooCommerce Events
Order Created:
User: customer_john
IP: 198.51.100.200
Details: Order #1234, Total: $99.99, Status: Pending
Product Updated:
User: shop_manager
IP: 203.0.113.80
Details: Product ID: 567, Name: "Blue Widget", Changes: Price
Database Storage
How Logs Are Stored
Activity logs are stored in a dedicated database table: wp_guard_dog_activity_log
Table structure:
id– Unique entry IDevent_type– Event identifieruser_id– WordPress user ID (0 for guest/system)user_login– Usernameip_address– Source IPevent_date– Timestampdetails– JSON-encoded event details
Database Performance
Optimization features:
- Indexed columns for fast queries
- Batch logging to reduce database writes
- Automatic cleanup of old entries (if configured)
- Efficient JSON storage for details
For large sites:
- Consider limiting events logged
- Enable automatic cleanup
- Monitor database table size
Data Management
Exporting Logs
To export activity log data:
- Go to Guard Dog → Activity Log
- Apply any desired filters
- Click Export (if available in your version)
- Choose format: CSV or JSON
- Download file
Uses for exports:
- Compliance documentation
- Backup before cleanup
- Offline analysis
- Importing to SIEM systems
Clearing Old Logs
Manual cleanup:
Via WordPress admin (if available):
- Go to Guard Dog → Settings → Data Management
- Choose date range to delete
- Click Clear Activity Log
- Confirm deletion
Via database (advanced):
-- Delete logs older than 90 days
DELETE FROM wp_guard_dog_activity_log
WHERE event_date < DATE_SUB(NOW(), INTERVAL 90 DAY);
Automatic cleanup:
Configure automatic deletion of old entries:
- Go to Guard Dog → Settings → Data Management
- Enable Automatic Log Cleanup
- Set Retention Period (e.g., 90 days)
- Logs older than retention period are automatically deleted
Recommended retention:
- Personal blog: 30-60 days
- Business site: 90-180 days
- Compliance requirements: Check your industry standards (often 1-7 years)
- E-commerce: 1-2 years (for order/payment tracking)
Backup Considerations
Activity logs are part of your WordPress database:
When backing up:
- ✅ Include the
wp_guard_dog_activity_logtable - ✅ Export critical events before cleanup
- ✅ Keep offsite backups for compliance
When restoring:
- ⚠️ Old logs may conflict with current state
- Consider clearing logs after restore
- Verify log dates make sense after restoration
Security & Privacy
What Data is Stored?
Always stored:
- Event type
- Username
- IP address
- Timestamp
Sometimes stored:
- Previous values (e.g., old post content, old user role)
- New values (e.g., new post content, new user role)
- Metadata specific to event
Never stored:
- Passwords (not even hashes)
- Private/sensitive content (unless it’s the subject of change)
- Session tokens
- Cookies
Privacy Considerations
IP addresses:
- IP addresses are personally identifiable in some jurisdictions (GDPR)
- Consider anonymizing or deleting old IP data
- Document IP storage in privacy policy
User activity tracking:
- Inform users their activity is logged
- Provide access to their own logs (GDPR requirement)
- Honor data deletion requests
Compliance:
- Check your industry/legal requirements
- Some regulations require activity logging
- Others require data minimization
Access Control
Who can view activity logs:
- Only administrators by default
- Logs contain sensitive security information
- Restrict access appropriately
For multi-admin sites:
- Ensure all admins are trustworthy
- Consider who should see security logs
- Logs reveal who did what (accountability)
Troubleshooting
Missing Events
Symptom: Expected events aren’t in the log
Possible causes:
- Event type is disabled in settings
- Event happened before logging was enabled
- Database error prevented logging
- Caching issue
Solutions:
- Check Event Settings – ensure event type is enabled
- Check the date range of your filter
- Check PHP error logs for database issues
- Clear cache and refresh
Too Many Events
Symptom: Activity log is overwhelming, hard to find relevant events
Solutions:
- Disable verbose events:
- Disable “Post Updated”, “Profile Updated”
- Keep only critical events
- Use filters:
- Filter by event type
- Filter by specific users
- Filter by date range
- Enable automatic cleanup:
- Set retention period
- Old logs are auto-deleted
- Export and clear:
- Export logs for archival
- Clear old logs manually
Performance Issues
Symptom: Site slow, database table very large
Causes:
- Activity log table has millions of rows
- Too many events being logged
- No automatic cleanup enabled
Solutions:
- Check table size:
SELECT table_name,
ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size (MB)"
FROM information_schema.TABLES
WHERE table_name = 'wp_guard_dog_activity_log';
- Clear old logs:
- Delete logs older than 30-90 days
- Immediate performance improvement
- Disable verbose events:
- Turn off “Post Updated”, “Comment Created”, etc.
- Reduces future growth
- Enable automatic cleanup:
- Prevents table from growing too large
- Optimize table:
OPTIMIZE TABLE wp_guard_dog_activity_log;
Best Practices
- Log security events – Always enabled, non-negotiable
- Be selective with content events – Only if needed
- Review logs regularly – Weekly for high-security sites
- Set up automatic cleanup – Prevent unlimited growth
- Export before major changes – Backup logs before site migrations
- Monitor for patterns – Recurring failures = investigation needed
- Document your retention policy – Legal/compliance requirements
- Limit admin access – Only trusted users should view logs
- Include in backups – Logs are part of your data
- Use for troubleshooting – First place to look when issues arise
FAQ
Q: How long are activity logs kept?
A: Indefinitely by default. Configure automatic cleanup to manage retention.
Q: Can users see their own activity?
A: Not by default. Only administrators can view activity logs.
Q: Do activity logs affect site performance?
A: Minimal impact. Logging is optimized and batched for efficiency.
Q: Can I export activity logs?
A: Yes, activity logs can be exported to CSV or JSON for archival or analysis.
Q: Are passwords logged?
A: No. Passwords are never logged, even in encrypted form.
Q: Can I disable activity logging completely?
A: Yes, but not recommended. At minimum, keep security events enabled.
Q: How do I find who deleted a post?
A: Filter by event type “Post Deleted” and check the user column.
Q: Can activity logs be deleted by users?
A: No. Only administrators can clear logs via settings or database access.
Q: Do logs include failed CAPTCHA attempts?
A: Yes, “CAPTCHA Failed” events are logged when CAPTCHA verification fails.
Q: What’s the difference between clearing logs and disabling events?
A: Clearing deletes existing logs. Disabling events prevents future logging of those event types.