The WordPress activity log can have thousands of events, especially on a busy website. So you need search functionality to easily find what you are looking for in the logs.
Search and filters are available in WP Activity Log premium. If you use the free edition, we have written an article on how you can still do some basic searches in the WordPress activity log without text searches and filters. This article explains how you can use the premium search functionality and the filters.
How to search for events in the WordPress activity log?
Type in the term you’d like to look for in the activity log in the search placeholder highlighted in the above screenshot. Note that when you use the text search the plugin searches in the metadata of events. So for example you can search for post names, plugin names, a file path or filename, a section of a URL or a full URL, or even an event ID.
Example of Text Searches
If for example you’d like to search for a list of events which have the word album in them, or all the custom post types with type album simply type in album. In the example below we can see that a search for the word album returns quite a few events.
Though when you do a generic text search, as in the above screenshot, most probably you’ll get a lot of events. In case you do get too many events, use the filters to fine tune the search results, as explained below.
Using the filters to fine tune the activity log search results
Filters help you fine tune the search results of the WordPress activity log. To add filters:
- click the Filter View button at the top right corner,
- specify the filter (if required, click the Add this filter button),
- Click Close Filters and run the search again by clicking the Search button.
Using the same example above, once we did a text search for the word album, we added two filters:
- Post status = pulished
- First name = Giovanni
Notice how, in the screenshot below there are now much less events, making it much easier to find exactly what you are looking for.
If you need to look for specific event IDs refer to the list of activity log event IDs and search the list to know what event ID is associated with a specific change.
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.