Description
PermaLogger records WordPress activity in your own database and links every entry to the previous one with SHA-256. Each row stores the hash of the row before it plus its own canonical form, so any edit, deletion, or reorder breaks the chain at the point of divergence. Run verification and it tells you exactly which row is wrong.
Everything works with no external service and no account. The optional BitcoinAPI integration publishes a checkpoint (the current chain head) to the BSV blockchain, which turns a locally verifiable trail into one a third party can check independently — useful when the person who might tamper with the logs is the person who controls the site.
What you get
- Tamper-evident hash chain — every row is linked to the previous row. Verification recomputes forward from the genesis anchor and reports the first divergence.
- Checkpoints — the chain head is recorded at intervals so a wholesale rewrite is detectable, not just single-row edits.
- One-click verification plus a per-entry chain proof.
- Optional on-chain attestation — publish a checkpoint to BSV, get the txid back, link it from the UI. Off by default.
- Alerts — email or any webhook URL (Slack, Discord, generic JSON endpoint) on failed logins, role changes, file changes. No dependency on BitcoinAPI.
- Exports — CSV, JSON, plain-text audit report, and a GDPR data-subject export per user.
- Privacy controls — optional IP hashing and PII scrubbing before anything is stored.
- WP-CLI —
wp permalogger verify,wp permalogger export --format=csv. - Read-only REST API —
permalogger/v1/logs,/logs/{id}(with chain proof),/integrity. Admin-only. - Multisite — per-blog tables, network-safe uninstall.
What is tracked
- Logins and failed logins
- Profile updates and password changes
- Email changes
- Role changes
- Post/page create, update, delete, status change, and optional sentence-level content diffs
- Admin navigation
- Plugin, theme, and core updates, plus a file checksum drift scan
- Frontend events: logout, comments, page views
- WooCommerce order status changes (when WooCommerce is active)
- All admin hooks (opt-in, for debugging)
Who this is for
Security auditing, incident response, compliance evidence (SOC2, ISO 27001, HIPAA, PCI DSS 10.6.1.1 audit trail requirements, NIS2), dispute resolution, and debugging user-reported issues. An audit trail that can be verified is worth more than an audit trail that can only be trusted.
Requirements
- WordPress 5.0 or higher
- PHP 7.0 or higher
- Nothing else. An API key is optional and only affects attestation.
External Services
This plugin can connect to an optional external service. It is not required for any core functionality.
Optional service:
* Service Provider: BitcoinAPI
* Purpose: publishes checkpoint head hashes for third-party attestation
* API Endpoint: https://bitcoinapi.io/api/
* Terms of Service: https://bitcoinapi.io/terms
* Privacy Policy: https://bitcoinapi.io/privacy
* Enabled only when you enter an API key and turn on attestation.
What is sent when enabled:
* Event data: username, user ID, email (unless scrubbed), IP address (unless hashed), timestamp, action details
* Checkpoint head hash and site URL when attestation is on
* Batches flush when the pending file reaches 100 KB
Never sent anywhere:
* Logs stored in your own database stay in your database. Nothing is transmitted unless you configure an alert webhook or enable attestation.
Alerts:
* Email goes to the address you set.
* Webhook goes to the URL you set. PermaLogger does not proxy alerts through its own service.
Privacy Policy
PermaLogger logs user activity. The following data is collected:
- Username and user ID
- Email address (optional, can be scrubbed)
- IP address (optional, can be hashed to a truncated SHA-256)
- Timestamp of actions
- Details of actions performed
Data stays in your WordPress database. It is transmitted only if you enable attestation with an API key, or configure an alert webhook. Disclose this in your privacy policy and obtain consent where required.
Support
- Plugin Support Forum: https://wordpress.org/support/plugin/permalogger/
- Documentation: https://bitcoinapi.io/docs
- Website: https://permalogger.com
- Contact: support@bitcoinapi.io
Credits
Developed by BitcoinAPI — https://bitcoinapi.io
Installation
- Install PermaLogger from the plugin directory or upload the ZIP.
- Activate it.
- Open Settings > PermaLogger.
- Choose which events to track. Logging and verification work immediately.
- Optionally add an API key to publish checkpoints to the blockchain.
- Run verification on the Integrity tab.
FAQ
Do I need an API key?
No. Logging, the hash chain, verification, chain proofs, alerts, exports, and the REST API all work with no external service. The API key only publishes checkpoints to the BSV blockchain so someone outside your site can verify the trail independently.
What is the difference between verification and attestation?
Verification recomputes the chain in your database and finds divergences. It catches single-row edits. If someone rewrites the whole chain forward, verification alone cannot tell — that is what checkpoints are for. A checkpoint records the head hash at a point in time. If that checkpoint is anchored on-chain, the head hash has an external witness and a full rewrite is provably detectable.
Does auto-delete break the chain?
No. Before deleting a range, PermaLogger records a checkpoint for that range, so verification can still confirm the gap is a legitimate retention delete rather than tampering.
Can I export my logs?
Yes. CSV, JSON, and a plain-text audit report for a date range. There is also a per-user GDPR data-subject export.
Is this GDPR friendly?
It can be. Enable IP hashing to store only a truncated SHA-256 of the address, and PII scrubbing to drop email addresses before anything is written. The data-subject export covers Article 15 and 20. Compliance still depends on your privacy policy and consent, but the plugin gives you the tools.
Will this slow down my site?
Inserts are one row per event with an advisory lock on the chain head. Enabling “Track All Admin Hooks” or frontend page views generates a lot of rows and is intended for debugging, not permanent use.
Which events trigger alerts?
Anything you tick. Defaults are failed logins, role changes, file changes, and integrity failures. Alerts go to email or any webhook URL, not to BitcoinAPI.
Can other tools read the logs?
Yes, through permalogger/v1/logs (admin-only) or WP-CLI.
Changelog
1.1.5
- Tamper-evident SHA-256 hash chain over every log row, verified forward from the genesis anchor.
- Checkpoints record the chain head so a wholesale rewrite is detectable.
- Integrity tab: one-click verification, issue list, per-entry chain proof.
- Optional on-chain attestation of checkpoints (off by default). The API key is now optional.
- Structured columns (event_type, user_id, username, ip, url) replace LIKE filtering on the JSON blob.
- Alerts: email and any webhook URL, independent of BitcoinAPI.
- Exports: CSV, JSON, plain-text audit report, GDPR data-subject export.
- Privacy: optional IP hashing and PII scrubbing.
- New event sources: role changes, plugin/theme/core updates and file checksum drift, frontend events, WooCommerce order status.
- WP-CLI:
wp permalogger verify|export|anchor|checkpoint. - Read-only REST API under
permalogger/v1. - Multisite support: per-blog tables, network-safe uninstall.
- Retention now runs on a daily cron (it never fired before), records a checkpoint before deleting, and uses the site clock instead of UTC.
- Pending batch file moved from
/tmpto the uploads directory, per blog, and appended with a lock instead of re-reading the whole file per entry. - Settings API callbacks fixed: boolean options were being stored as an array because the sanitize callback was passed as a bare function name.
- API key validation no longer blocks saving when the service is unreachable, and no longer throws on a WP_Error response.
user_profile_update_errorshandler guards against a null user.- FULLTEXT search now falls back to LIKE when the index is unavailable.
- Values are clamped to their column width before hashing, so a field MySQL truncates cannot look like tampering.
- Rows inserted without an advisory lock are reported as unprovable links instead of trusted, because the flag that marks them sits outside the hash and can be forged. Chain proofs now agree with verification on those rows.
- Text domain is now actually loaded.
- GDPR subject export also matches pre-1.1.0 rows that recorded only the login, but only when the row has no user_id, so it cannot return another account’s rows.
- Translation template regenerated: 147 strings.
- Uninstall drops the checkpoint table and deletes the correct option names, removes the pending batch file from the temp directory and the uploads fallback, and only removes the uploads directory when it is empty.
1.0.7
- Improved log viewer: full-text search, date range filter.
- JSON detail modal with syntax highlighting and copy-to-clipboard.
- Database performance: added timestamp index and FULLTEXT index on log column.
- Automatic DB migration for existing installs.
1.0.0
- Initial release.