How do I create a WordPress activity log?
Do you want to create a WordPress activity log?
A small website doesn't have to worry about this. Everything is controlled by a single owner. As traffic increases, new members will join your crew. Or you run a website where anyone can create an account (membership site, e-commerce stores, forums), you will have a harder time keeping track of the changes.
At this moment, you want to know which user made which change on the website. In this post, you will learn how to track WordPress activity log using a plugin. And this small action makes WordPress websites more secure.
Why use the WordPress activity log?
The WordPress activity log records all changes made to the website.
If you are the only user of your WordPress site, you know (or maybe you don't remember) that the change was made by you. But as the number of site administrators, users, authors, and managers grows, you need to track the changes to make sure everyone is following the site policies.
In addition to maintaining brand image, it is important to know who made the change so you can hold people accountable for tasks that do not meet requirements or praise them for making a positive change.
You want to know things like:
- Who deleted a plugin?
- Who made the specific change to the website?
- Who added a new plugin?
- Who changed the topic?
The activity log can also track users' activities to detect an ongoing hacker attack or resource theft. And you can't record all the changes manually. That's why you need a WordPress activity log plugin that does this job efficiently and automatically.
Step 1: Install the Activity Log Plugin
First, we will install a plugin that will help us keep the log. The name of the plugin is Activity Log and it is developed by the Activity Log Team. There are other Activity Log plugins, but we find this one better and easier.
Follow the step-by-step instructions to install a WordPress plugin log.
In summary:
- Log in to the WordPress dashboard
- In the left sidebar, navigate to Plugin >> Add New
- Searching the Activity Log
- Install the Activity Log plugin
- Activate the plugin
That's it. You have successfully downloaded and activated the Activity Log plugin.
Step 2: Configure the Activity Log plugin
Once activated, you will find the plugin under the Dashboard in the left navigation pane in the WordPress admin dashboard area. Hover over the name and click the Settings button to open the plugin settings.
On the settings page we can make changes to the activity log.
Keep a log of: Enter the number of days to keep the logs. The longer you keep the log, the more disk space will be required.
Keep logs for failed logins: Whether to keep the failed login logs or not. If you get a lot of failed logins, it indicates that someone is trying to log into your account using the brute force method. You can optimize the login page security by doing the following:
If you want to remove all logs with one click, you can click Reset Database. Finally, click Save Changes button to save the changes.
That's all. Your activity log plugin is working on your website. Make changes and check for yourself whether the activity log is recording logs or not.
How can I view the WordPress activity log?
Click on Activity Log to view the WordPress activity log.
You can complete action logs on this page. Time, date, IP address and even context.
- The date and time of the change are displayed under “Date”.
- User is the user who made the change.
- IP is the user's IP address.
- Topic shows the category of the change.
- Context is an indication of the location of the change or other information.
- Meta provides quick information about the change.
- An action is concrete information about the changes or the location of the changes.
There is also a filter because the number of logs is very high and you cannot find certain log types manually.
The plugin has sorted the different logs by roles (WordPress user roles), users (account on the website), topics (plugins, users, themes) and actions (failed logins, disabled, enabled).
If you scroll down, you will find an option to export WordPress activity log as CSV.
What happens if I uninstall a plugin?
If you disable the Activity Log plugin, the log will remain protected. However, if you uninstall the Activity Log plugin, all databases containing the activity log files will be deleted. Uninstalling or disabling will not affect the WordPress website in any way.
Concluding remarks
Life is a butterfly effect. A small change to your website without your knowledge can cause big changes. Installing an outdated plugin, updating an incompatible plugin, or making a quick change to the site's header color – all of these can affect the site's security, speed, and even monetization.
If your site has a lot of contributors, it's important to keep track of changes to make sure you're always up to date.
In this quick tutorial, we learned how to create a WordPress activity log using a plugin. If you face any problems, please let me know in the comment box.