WordPress-Simple-History: The Plugin That Turns WordPress Into a Black Box Recorder

A deceptively simple audit trail that pairs a flexible event model with a two-table context system, modern PHP architecture, and developer-friendly logging hooks.

9 min read • View on GitHub • More from bonny

A WordPress dashboard reimagined as a control room, with a recorder spool at the center and event slips feeding into a ledger. It explains that the plugin records actions and preserves context instead of just storing timestamps.
Simple History is less like a raw log and more like a black box recorder for the CMS. The event matters, but the surrounding context is what makes the record useful later.
Key Takeaways

Most WordPress audit logs start with the symptom. Simple History starts with the missing evidence. A deleted page, a changed role, a plugin setting flipped at the wrong moment. Once you have lived through enough of those, the value of a clean history feed becomes obvious.

What makes this plugin worth studying is not that it keeps a log. It is that it treats history like a system. The visible feed is only the surface. Under it sits a data model that makes WordPress feel less like a mutable blur and more like a traceable machine.

The real trick is the context table

The most interesting design choice in Simple History is the split between the event record and the event context. One table stores the event itself. Another stores the arbitrary details around it. That means the plugin does not have to decide in advance whether a change will need one value, ten values, or a before-and-after pair.

That matters because audit data is messy. A post update and a user role change do not share the same shape, and forcing them into a single rigid schema usually means either migration pain or empty columns. Simple History avoids both. The core record stays stable. The context grows with the event.

However, there was a glaring problem: How could we know what had been changed on a website?

That question is the whole project in miniature. The plugin is not trying to become a database of everything. It is trying to preserve the evidence that lets you answer the next question quickly.

A close-up of one event splitting into a main record and several labeled drawers for who, what changed, before and after, and initiator. A thin line connects the drawers to a diff panel. It explains how the context table powers flexible history entries and quick comparisons.
This is the move that keeps the plugin flexible. The event stays small, while the context carries the detail that makes the record human-readable and diffable.

A flexible schema unlocks a friendly feed

Once the data model is split cleanly, the UI becomes easier to trust. The history feed can summarize events without pretending every event is identical. The quick diff can show the delta that matters. Administrators get a readable narrative. Developers get a structure they can extend.

That is why Simple History feels lighter than many audit tools. It does not ask you to learn a sprawling admin product before it becomes useful. It offers a simple feed, then quietly keeps enough structure behind the scenes to support more serious work.

The plugin behaves like a real system, not a pile of hooks

Under the hood, the codebase looks more modern than many WordPress plugins of similar age. There is a service-oriented layout, PSR-4 style autoloading, and a central class that registers services instead of forcing everything into one procedural file. That does not make it abstract for its own sake. It makes the plugin easier to reason about.

do_action( 'simple_history_log', array(
    'message'   => 'Post updated',
    'level'     => 'info',
    'context'   => array(
        'post_id'   => 42,
        'old_title' => 'Draft A',
        'new_title' => 'Final Title',
    ),
) );

That hook is elegant because it is optional. If the plugin is present, the action becomes a logging entry point. If it is not, the call disappears harmlessly into WordPress' action system. For third-party developers, that is a low-risk integration point, which is exactly what logging should be.

ApproachWhat it optimizes forTrade-off
Simple HistoryReadable history, flexible context, low-friction integrationNot meant to be an all-in-one compliance suite
Heavier audit pluginsBroader coverage and enterprise controlsMore operational weight and more configuration
Single-table log designSimplicity at write timeRigid schema, awkward diffs, and migration pain

The comparison is not about absolute power. It is about fit. If you need broad governance features, bigger tools may be the right answer. If you want a history layer that developers can extend without feeling trapped by the database, Simple History has a sharper shape.

The API speaks WordPress, but the discipline is modern

The query layer borrows familiar WordPress patterns, which lowers the learning curve, but it behaves like a proper system component. Event objects, log queries, initiators, and log levels are all named and structured instead of scattered across ad hoc arrays. That is a small but important difference.

The project also makes a careful choice around terminology. It uses a PSR-3-inspired vocabulary for levels, which lets the plugin map severity and presentation in a way that feels familiar to PHP developers. In other words, the feed is friendly, but the model underneath is not casual.

NeedAdministrator viewDeveloper view
See what happenedA readable activity streamStructured event objects
Understand impactQuick diffs and contextual labelsArbitrary context rows and custom loggers
Ship safelyA UI that does not overwhelmA hook-based API with low coupling

That duality is the real product strategy. Non-developers get an understandable dashboard. Developers get a logging surface that looks simple on purpose and scalable by design.

Why this plugin has lasted

Starting today and for the next three months, I will be working on Simple History almost full time!

Pär Thernström, Creator · Three months of full time

Longevity in WordPress is rarely about one brilliant release. It is about staying useful while the platform moves around you. Simple History has done that by modernizing the internals, keeping the UI approachable, and supporting a premium path that helps fund continued maintenance.

That matters more than it sounds. A lot of plugins can log events. Fewer can keep logging events year after year without turning into maintenance debt. The combination of service architecture, refactoring tools, and a restrained product scope gives this project a survivable shape.