If you have multiple website contributors or administrators, you need a WordPress activity log. An activity log keeps you abreast of changes at a glance. You can see who changed what and when it was done.
Even if you are the only site administrator, a record of when changes were made can come in very handy. For instance, when you have to troubleshoot an error or other problem. Knowing exactly when you did something will make fixing any resulting problems much easier.
WordPress doesn’t have any built-in logging abilities, so to start logging changes, we have to use a plugin. There are a few logging plugin options, but we’re going to install the Activity Log plugin to do our logging.
Activity Log will show us when posts were published and who published them. It keeps track of when plugins are activated or deactivated. We’ll even be able to receive email based on specific activity triggers.
Once you use the plugin to track user activity, you’ll wonder how you ever lived without a web activity log as a crucial part of your WordPress site.
Installing the Activity Log Plugin
Log in to your WordPress admin panel.
In the left column navigation, mouse over the “Plugins” link and click the “Add New” link.
In the “Search plugins…” box, enter “Activity Log.”
Once you have located the plugin, click the “Install Now” button.
Now the plugin is installed, but it has to be activated before you can use it.
Click the “Activate” button.
Configuring Activity Log
In the left column navigation, mouse over the “Activity Log” link and click the “Settings” link.
There are two tabs on the “Activity Log Settings” page. For now, we’re working on the “General” tab.
Change the “Keep logs for” setting if you want to increase or decrease the number of days that are logged. Bear in mind that like any cumulative data, the longer the retention period, the more space the logs will consume.
Click the “Save Changes” button to save your update.
Unlike traditional website logs, the activity logs are stored in your WordPress database. Be sure to consider that if database size or storage space is a concern. The longer you keep logs, the larger your database backups will become.
The other option on the page is to delete existing logs. Click the “Reset Database” link to clear the records. It is not possible to retrieve old logs once you do this.
Viewing the WordPress Activity Log
In the left column navigation, click the “Activity Log” link.
Now you can see just how comprehensive the activity logs are. It’s an impressive amount of useful information.
Note that the plugin also serves as a WooCommerce log, noting changes made in WooCommerce configuration. And it doesn’t stop there. It will do that for (almost) every plugin that you have installed.
As you can see, it is also a settings log, tracking settings changes made to WordPress, in addition to logging plugin activation and deactivation.
Here’s what each column is telling you:
- Date shows the date and time of the change.
- Author is the user who made the change.
- IP is the user’s IP address.
- Type shows the category of the change.
- Label is a note on the location of the change, or other information.
- Action is what was done as part of the change.
- Description is specific information about, or the location of, the changes.
You can filter the WordPress logs by some pre-defined date ranges, or show actions by a specific user. The logs can also be filtered by actions.
For example, to see all plugin deactivations, select “Deactivated” from the drop-down, and click the “Filter” button.
How to Get Email Alerts From the WordPress Update Log
The most convenient way to monitor user activity is via email alerts. Setting up those alerts is easy, and the plugin is very flexible as far as which information can be sent.
In the left column navigation, mouse over the “Activity Log” link and click the “Settings” link.
Click the “Notifications” tab.
The “Notification Events” section is where you choose what kind of action will trigger an email.
For example, if you want to receive an email every time a particular user makes a change, leave the first drop-down set to “User,” the second drop-down to “Equals to,” then select the user from the final drop-down.
Clicking the “+ and” button in “Notification Events” adds another condition to the configuration. So you can receive an alert when a user makes a post by specifying with a second condition.
In the interest of keeping this tutorial simple, we’ll use only a single condition. But to get the most out of the plugin, you’ll want to explore using multiple conditions.
In the “Email” section, set “Enable?” to “Yes.”
Enter the email address that you want the notice sent from in the “From Email” field, and the email address of the recipient of the notice in the “To Email” field.
You can customize the email in the “Message” field.
Click the “Save Changes” button.
The only drawback to the system is that it isn’t possible to set up multiple notification emails. If you want to add an event, click the “+ and” button in “Notification Events” to add another condition to the existing notice.
What Happens if You Uninstall the Plugin
Uninstalling the plugin does not affect your site.
When you deactivate the plugin, its database table—and all the existing log data—remains. If you uninstall the plugin, the database table and data are deleted. Keep that in mind if you want to retain the change data the plugin has collected.
If You Need a WordPress Activity Log for a Multisite Installation
Check out the WP Security Audit Log plugin.
The plugin performs essentially the same logging as Activity Log, but it does logging for WordPress Multisite installations.
It will work on your single site installation as well, but certain features, like email notifications, are only available if you upgrade to a paid version of the plugin.
Keeping Your Eye on the Comings and Goings
I don’t know about you, but I’ve been frustrated by a lack of information about website changes more times than I care to remember. Even when I know I’m the person who made the changes.
A tool like the Activity Log plugin could have saved me from some of that frustration. It’s the most full-featured of the available monitor plugins. The ability to be notified of important changes with an email ensures that no changes will slip past you unnoticed.
The renowned impressionist painter Claude Monet said, “It’s on the strength of observation and reflection that one finds a way. So we must dig and delve unceasingly.” Not to get too esoteric on you, name-checking an impressionist painter, but I think that applies here. 😉
If we know what’s happening, if we observe, it can help us find our way toward increased efficiency and productivity. Maybe not exactly what Monet had in mind, but it works.
Do you make use of activity logs as part of your website management duties? Is there any user activity that this plugin doesn’t log but that you would like to monitor? Let me know in the comments.