How to Track User Login Activity in WordPress Using the Activity Log Plugin

Transcription

So for today’s video, I have a plugin showcase for you. That plugin is called Activity Log, so I’m going to actually show you which one it is, it’s this one right here, Activity Log, and the author is Activity Log Team. It’s of course available in the standard WordPress repository. In my case, I’ve already activated it, so when I go back to my dashboard, you’ll notice I have an Activity Log entry on the left.

What this plugin does, is it adds a feature I wish existed from the start in WordPress, you actually get to see what happened to each user as they’re using the site. You see when they logged in, when they logged out, you see when they’re failing to log in, you see when certain things happen like their profiles are updated, things like that. And this can be super useful when you’re trying to help someone that’s struggling to log into your site, especially if you work in IT support.

So for example, if I were to search for the user “jdoe” up here, I would see a list of everything that happened to this person. So he was first registered by me, then he failed to log in, then he logged in, then he logged out, then he failed to log in again, then he updated his profile, maybe he forgot his password and changed it. So this tells you really the story.

If you have a user that contacts you and says hey, I’m having trouble logging into your site – and then you help them, by resetting their password, or whatever, you can then check later to see if they logged in successfully. This is useful because users don’t always tell you when their problem is solved, they just go about their life. It’s of course best if they tell you, but if they don’t, well, you have a tool where you can see if they’re okay. And you can validate that what you did for them actually solved their problem.

So there’s another use to Activity Log that I didn’t cover yet. I’m going to go back here, and here when we scroll down, I’ll bring your attention to this line, where it says username “admin” – now this is interesting because I don’t have a user called admin, so the IP address that’s listed here, is someone that tried to connect to an account that doesn’t exist, and if they’re trying to connect to the admin account, hmmm, they’re probably malicious. So I can act on this information and block that IP, for example – now you’d need another plugin for this, or you’d have to use some .htaccess features on the Apache side, and I’ll cover that in another video, but the point is, this can give you some valuable information.

So as a final step I’ll just show you some of the dropdowns at the top. So you can filter by different actions, failed login, activated, registered, updated – you also can filter by topic, so we’ve got plugins, users. You can filter by role, as you can see here, and you can filter by when this action occurred, so naturally the sooner you install this plugin the sooner you start collecting logs which can help you build a history of what’s happening to your users.

And then finally let’s take a look at the settings here on the left hand side, I’m going to click settings – so here you have some settings, keep the logs for, by default, it says 30 days – note here that you could put a giant number or leave it blank like they say here – “Leave blank to keep the activity forever”, but they don’t recommend it, and I kind of understand – you don’t want a database that continuously keeps growing and growing, so depending on how many users you have, think about how many days you care about here. I’m inclined to do 6 months, something like that, or 90 days, you know, a value like that, but not, not forever.

And this setting, keep failed login logs, I do recommend keeping that, and so do they, it seems like, because it’s interesting like we just saw to see when people failed to log in, because what username are they entering, right? And then there’s visitor IP detected, which I would leave to remote address, because having that IP is interesting, again, if you have a malicious actor, you may want to block that IP address. And then here you have a reset in case you want to wipe out every activity in the database.

So that’s it guys, that was the activity log plugin – if you guys have a better option, a better plugin that does this, don’t hesitate to let me know, I’m always interested. And as always, don’t hesitate to reach out if you need help with anything, or have any additional questions or comments. Have a great day.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.