Read the audit log
get_audit_logFetch the append-only audit log of sensitive WordPress actions—writes, deletes, SQL, WP-CLI—with timestamps, sites, and outcomes. Use filters to view recent entries per site or all sites.
Instructions
Read the append-only local audit log of every sensitive action this server has taken — writes, deletes, SQL, WP-CLI, theme publishes — with timestamp, site, tool, target and outcome. Useful for answering "what did the AI actually change?".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | How many of the most recent entries to return. | |
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. | |
| all_sites | No | Include entries for every site rather than just one. |