The WordPress activity log can have thousands of events, especially on a busy website. Therefore it can be quite difficult to find what you are looking for unless you have some sort of search. The good thing with the WP Security Audit Log plugin is that you can still do basic searches in the WordPress activity log without text searches and filters. Though when you upgrade to the premium edition of the WordPress activity log plugin you can do text searches and use filters to fine tune the search results.
How to do text searches in the WordPress activity log?
Use the text search placeholder highlighted in the above screenshot to do text searches in the WordPress activity log. Though text searches in general have a bit of a limitation, they can return too many events. For example you need to find out when the user kypri changed the content of the post hello world. If you search for hello world the search result might have many events because many other users have made changes to that post, as seen in the post below.
If you search for kypri you will still get too many events in the search results because kypri does a lot of changes on other posts and on the website. So to circumvent this problem we have search filters.
Using filters to fine tune the WordPress activity log search results
Filters help you fine tune the search results of the WordPress activity log. To add filters and filter the search results:
- click on the funnel icon next to the column header in the audit log viewer,
- specify the filter and click the + sign,
- close the filters dialogue by clicking the X,
- run the search again by clicking the Search button.
Using the same example above, once we do a text search for the post hello world we will add a filter for the user kypri so we can see what changes the user kypri did on the post hello world. Notice the highlighted filter in the below screenshot.
Now that we have the filter in place we can see all the changes that the user kypri did on the post hello world. If we want to we can filter the search results even further. For example when there is a content change the plugin uses event ID 2065 to keep a log of the content change. So we can add another filter on top of that for events with ID 2065.
Saving search terms and filters
If you do the same search and use the same filters often, you can save that search term and filters. To save search terms and filters:
- Enter the search term and run the search,
- Add the filters and run the search again,
- Click on the Save Search & Filters button. The names of the saved searches can only by 12 characters long and can only contain letters, numbers and underscores.