Simple History – user activity log, audit tool

Description

Simple History shows recent changes made within WordPress, directly on your dashboard or on a separate page.

The plugin works as a log/history/audit log/version history of the most important events that occur in WordPress.

It’s a plugin that is good to have on websites where several people are involved in editing the content.

Out of the box Simple History has support for:

  • Posts and pages – see who added, updated or deleted a post or page

  • Attachments – see who added, updated or deleted an attachment

  • Taxonomies (Custom taxonomies, categories, tags) – see who added, updated or deleted an taxonomy

  • Comments – see who edited, approved or removed a comment

  • Widgets – get info when someone adds, updates or removes a widget in a sidebar

  • Plugins – activation and deactivation

  • User profiles – info about added, updated or removed users

  • User logins – see when a user login & logout. Also see when a user fails to login (good way to catch brute-force login attempts).

  • User edits – see when a user is added, updated or removed, and get detailed information about the changes made to the user.

  • Failed user logins – see when someone has tried to log in, but failed. The log will then include ip address of the possible hacker.

  • Menu edits

  • Option screens – view details about changes made in the different settings sections of WordPress. Things like changes to the site title and the permalink structure will be logged.

  • Privacy page – when a privacy page is created or set to a new page.

  • Data Export – see when a privacy data export request is added and when this request is approved by the user, downloaded by an admin, or emailed to the user.

  • User Data Erasure Requests – see when a user privacy data export request is added and when this request is approved by the user and when the user data is removed.

Support for third party plugins

By default Simple History comes with built in support for the following plugins:

  • Jetpack – The Jetpack plugin is a plugin from Automattic (the company behind the WordPress.com service) that lets you supercharge your website by adding a lot of extra functions.
    In Simple History you will see what Jetpack modules that are activated and deactivated.

  • Advanced Custom Fields (ACF) – ACF adds fields to your posts and pages.
    Simple History will log changes made to the field groups and the fields inside field groups. Your will see when both field groups and fields are created and modified.

  • User Switching – The User Switching plugin allows you to quickly swap between user accounts in WordPress at the click of a button.
    Simple History will log each user switch being made.

  • WP Crontrol – The WP Crontrol plugin enables you to view and control what’s happening in the WP-Cron system.
    Simple History will log when cron events are added, edited, deleted, paused, resumed, and manually ran, and when cron schedules are added and deleted.

  • Enable Media Replace – The Enable Media Replace plugin allows you to replace a file in your media library by uploading a new file in its place.
    Simple history will log details about the file being replaced and details about the new file.

  • Limit Login Attempts – The plugin Limit Login Attempts is old
    and has not been updated for 4 years. However it still has +1 million installs, so many users will benefit from
    Simple History logging login attempts, lockouts, and configuration changes made in the plugin Limit Login Attempts.

  • Redirection – The redirection plugin manages url redirections, using a nice GUI. Simple History will log redirects and groups that are created, changed, enabled or disabled and also when the global plugin settings have been modified.

  • Duplicate Post – The plugin Duplicate Post allows users to clone posts of any type. Simple History will log when a clone of a post or page is done.

  • Beaver Builder – The plugin Beaver Build is a page builder for WordPress that adds a flexible drag and drop page builder to the front end of your WordPress website. Simple History will log when a Beaver Builder layout or template is saved or when the settings for the plugins are saved.

Plugin authors can add support for Simple History in their plugins using the logging API. Plugins that have support for Simple History includes:

What users say

300+ five-star reviews speak to the reliability of this plugin.

  • “So far the best and most comprehensive logging plugin”@herrschuessler

  • “The best history plugin I’ve found”Rich Mehta

  • “Custom Logs Are Crazy Awesome!”Ahmad Awais

  • “Amazing activity logging plugin”digidestination

  • “Fantastic plugin I use on all sites”Duncan Michael-MacGregor

  • “Useful Quick View of Activity”Dan O

  • “The best Activity Plugin”Rahim

  • “The best free history plugin ever”abazeed

  • “It is a standard plugin for all of our sites”Mr Tibbs

RSS feed with changes

Using the optional password protected RSS feed you can keep track of the changes made on your website using your favorite RSS reader.

Comes with WP-CLI commands

For those of you who like to work with the command line there are also some WP-CLI commands available.

  • wp simple-history list – List the latest logged events.

Example scenarios

Keep track of what other people are doing:
“Has someone done anything today? Ah, Sarah uploaded
the new press release and created an article for it. Great! Now I don’t have to do that.”

Or for debug purposes:
“The site feels slow since yesterday. Has anyone done anything special? … Ah, Steven activated ‘naughty-plugin-x’,
that must be it.”

API so you can add your own events to the audit log

If you are a theme or plugin developer and would like to add your own things/events to Simple History you can do that by using the function SimpleLogger() like this:

<?php

if ( function_exists("SimpleLogger") ) {

        // Most basic example: just add some information to the log
        SimpleLogger()->info("This is a message sent to the log");

        // A bit more advanced: log events with different severities
        SimpleLogger()->info("User admin edited page 'About our company'");
        SimpleLogger()->warning("User 'Jessie' deleted user 'Kim'");
        SimpleLogger()->debug("Ok, cron job is running!");

}
?>

See the documentation for examples on how to log your own events and how to query the log, and more.

Translations/Languages

So far Simple History is translated to 17 languages: Chinese (China), Danish, Dutch, Dutch (Belgium), English (US), French (France), German, German (Switzerland), Korean, Polish, Portuguese (Brazil), Russian, Spanish (Colombia), Spanish (Mexico), Spanish (Spain), Spanish (Venezuela), and Swedish.

If you want to translate Simple History to your language then read about how this is done over at the Polyglots handbook.

Contribute at GitHub

Development of this plugin takes place at GitHub. Please join in with feature requests, bug reports, or even pull requests!
https://github.com/bonny/WordPress-Simple-History

Sponsor this project

If you like this plugin please consider donating to support the development.

You can donate using PayPal or you can become a GitHub sponsor.

There is also some add-ons that you can buy to support the development of this plugin and get some extra features.

Screenshots

  • The log view + it also shows the filter function in use - the log only shows event that are of type post and pages and media (i.e. images & other uploads), and only events initiated by a specific user.

  • The Post Quick Diff feature will make it quick and easy for a user of a site to see what updates other users have done to posts and pages.

  • When users are created or changed you can see details on what have changed.

  • Events have context with extra details - Each logged event can include useful rich formatted extra information. For example: a plugin install can contain author info and a the url to the plugin, and an uploaded image can contain a thumbnail of the image.

  • Click on the IP address of an entry to view the location of for example a failed login attempt.

  • See even more details about a logged event (by clicking on the date and time of the event).

  • A chart with some quick statistics is available, so you can see the number of events that has been logged each day. A simple way to see any uncommon activity, for example an increased number of logins or similar.

FAQ

Can I add my own events to the log?

Yes. See the Developer Documentation.

Is it possible to exclude users from the log?

Yes, you exclude users by role or email using the filter simple_history/log/do_log.

See the hooks documentation for more info.

For how long are events stored?

Events in the log are stored for 60 days by default. Events older than this will be removed.

This can be modified using the filter simple_history/db_purge_days_interval or using the Simple History Extended Settings add-on.

Reviews

January 7, 2024 3 replies
Hi,about 3 months ago, I was able to see the traffic of a specific page in this plugin, and now I don't know. The user interface was completely changed. I also set to see as many records as possible, and now that I have logged into the site, I can see that only the last 2 months are being recorded. I have automatic plugin updates enabled in the background due to security updates. Lukas
December 24, 2023
i have been using this plugin on numerous sites for several years now and have never had any issues. I have used similar things on the past and have had performance problems. It captures the most important events and let's me see who has made changes and to what. This is very helpful information when troubleshooting problems caused by other users. The logging tends to be just complete enough to provide a solid picture of what's happening. Thank you to the developers for providing such an excellent tool!
November 21, 2023
This is simply a great plugin. Plug the RSS feed into a RSS reader, and you can monitor multiple sites for activity in one place. Great work!!
Read all 380 reviews

Contributors & Developers

“Simple History – user activity log, audit tool” is open source software. The following people have contributed to this plugin.

Contributors

“Simple History – user activity log, audit tool” has been translated into 16 locales. Thank you to the translators for their contributions.

Translate “Simple History – user activity log, audit tool” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

4.12.0 (februari 2024)

Added

  • Theme activation/switch done via WP CLI (e.g. wp theme activate twentytwentyone) is now logged.

Fixed

  • Message type search/filter not working. #428
  • PHP notice when user has no roles. #429.

4.11.0 (february 2024)

This version introduces improved user role support and enhanced export functionality. For more details and screenshots, check out the release post.

Added

  • Improved support for detecting and displaying changes to user role(s), including showing the adding and removal of multiple roles. This improvement is tested with the Member plugin and the Multiple Roles plugin. #424.
  • Column with user role(s) are included in the CSV and JSON exports. #423.
  • Column with event date based on current timezone added to CSV export, in addition the the existing GMT date. #422.

Fixed

  • Ensure only strings are escaped in csv export. #426.

4.10.0 (January 2024)

This version introduces new features and improvements, including an enhanced first experience for new users. For more details and screenshots, check out the release post.

Added

  • Add logging of terms (custom taxonomies and built in tags and categories supported) added or removed to a post. #214.

Improved

  • Terms that are added, removed, or modified are now grouped. #398.
  • Show a more user-friendly and informative welcome message after installation. #418.

Fixed

  • Missing translation in sidebar. #417.
  • ‘Activated plugin “{plugin_name}”‘ message after first install.
  • Duplicated plugin installed and activated messages after first install. #317.

Removed

  • Remove usage of load_plugin_textdomain() since it’s not required for plugins that are translated via https://translate.wordpress.org/. #419.

4.9.0 (January 2024)

This release comes with improvements to the SQL queries that the plugin use to fetch events. These optimizations enhance query performance and reliability on both MySQL and MariaDB. Additionally, the plugin now provides support for SQLite databases.

Read the release post for more information.

4.8.0 (December 2023)

🧩 This release contains minor fixes, some code cleanup, and adds support for add-ons!

  • Add support for add-ons. Add-ons are plugins that extends Simple History with new features. The first add-on is Simple History Extended Settings that adds a new settings page with more settings for Simple History.
  • Add last_insert_data property to Logger class.
  • Fix position of navigation bar when admin notice with additional class “inline” is shown. Fixes #408.
  • Update logotype.
  • Fix notice when visiting the “hidden” options page /wp-admin/options.php.
  • Move functions get_pager_size(), get_pager_size_dashboard(), user_can_clear_log(), clear_log(), get_clear_history_interval(), get_view_history_capability(), get_view_settings_capability(), is_on_our_own_pages(), does_database_have_data(), setting_show_on_dashboard(), setting_show_as_page(), get_num_events_last_n_days(), get_num_events_per_day_last_n_days(), get_unique_events_for_days() from Simple_History class to Helpers class.
  • Remove unused function filter_option_page_capability().
  • Update coding standards to WordPressCS 3.
  • Misc code cleanup and improvements.

4.7.2 (October 2023)

  • Changed: Check that a service class exists before trying to instantiate it.
  • Added Connection Business Directory to list of plugins with Simple History support.
  • Added new icons! ✨
  • Tested on WordPress 6.4.

4.7.1 (October 2023)

  • Fix: Only context table was cleared when clearing the database. Now also the events table is cleared.
  • Add function AddOns_Licences::get_plugin().
  • Misc internal code cleanup and improvements.

4.7.0 (October 2023)

Most notable in this release is the new logotype and a new shortcut to the “Settings & Tools” page.
Read the release post for more info.

  • Changed: UI changes, including a new logo and a shortcut to the settings page.
  • Add function get_view_history_page_admin_url().
  • Add filter simple_history/log_row_details_output-{logger_slug} to allow modifying the output of the details of a log row.
  • Misc internal code cleanup and improvements.

4.6.0 (September 2023)

This release contains some new filters and some other improvements.
See the release post for more info.

  • Added: Filter simple_history/get_log_row_plain_text_output/output to be able to modify the output of the plain text output of a log row. Solves support thread Is it possible to log post ID. See documentation page for filter for details.
  • Added: Filter simple_history/log_insert_data_and_context to be able to modify the data and context that is inserted into the log.
  • Added: WP-CLI command now includes “via” in output.
  • Added: Debug settings tab now shows if a logger is enabled or disabled.
  • Changed: WP-CLI: ID field is not the first column and in uppercase, to follow the same format as the other wp cli commands use.
  • Changed: GUI enhancements on settings page.
  • Changed: Don’t log WooCommerce post type shop_order_placehold, that is used by WooCommerce new High-Performance Order Storage (HPOS).
  • Fixed: Allow direct access to protected class variable $logger->slug but mark access as deprectad and recommend usage of $logger->get_slug(). Fixes support thread PHP fatal error Cannot access protected property $slug.

4.5.0 (August 2023)

This release contains some smaller new features and improvements.
See the release post for more info.

Added

  • The debug page now detects if the required tables are missing and shows a warning. This can happen when the database of a website is moved between different servers using software that does not know about the tables used by Simple History. Fixes issue #344 and support thread Missing table support among others.
  • Add filters simple_history/feeds/enable_feeds_checkbox_text and simple_history/feeds/after_address.
  • Add action simple_history/settings_page/general_section_output.
  • Add filter simple_history/db/events_purged that is fired after db has been purged from old events.
  • Add helper functions required_tables_exist(), get_class_short_name().
  • Add function get_slug() to Dropin class.
  • Add function get_rss_secret() to RSS_Dropin class.
  • Show review hint at footer on settings page and log page.
  • Add functions get_instantiated_dropin_by_slug(), get_external_loggers(), set_instantiated_loggers(), set_instantiated_dropins(), get_instantiated_services() to Simple_History class.
  • Dropins and services are now listed on the debug page.

Changed

  • Order of settings tab can now be set with key order in the array passed to add_settings_tab().
  • Rename network admin menu item “Simple History” to “View History” to use to same name as the admin menu item.
  • Purged events are logged using the simple history logger (instead of directly in the purge function).
  • Refactor code and move core functionality to multiple service classes.

4.4.0 (August 2023)

This version of Simple history is tested on the just released WordPress 6.3. It also contains some new features and bug fixes.

Release post for Simple History 4.4.0.

Added

  • Logger for logging changes to the Simple History settings page. 🙈 And yes, it was quite embarrassing that the plugin itself did not log its activities.
  • RSS feed now accepts arguments to filter the events that are included in the feed. This makes it possible to subscribe to for example only WordPress core updates, or failed user logins, or any combination you want. See the documentation page for available arguments and some examples. #387
  • Event ID of each entry is included in WP-CLI output when running command wp simple-history list.
  • Filter simple_history/settings/log_cleared that is fired after the log has been cleared using the “Clear log now” button on the settings page.
  • Add helper function is_plugin_active() that loads the needed WordPress files before using the WordPress function with the same name. Part of fix for #373.

Fixed

Changed

  • Tested on WordPress 6.3.
  • Use uniqid() as cache invalidator instead of time(). Querying the log multiple times during the same PHP request with the same arguments, adding entries to the log between each log query, the same results would be returned.
  • Function get_event_ip_number_headers() moved from Simple Logger class to Helpers class.
  • Misc internal code cleanup.

4.3.0 (July …