Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/azanumer/wp-rest-api-logger/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Logs every WordPress REST API request — route, method, status, duration, IP and user — so you can see exactly who is hitting your API, which endpoints are slow, and where the errors come from.
Features
- Full request log — method, route, HTTP status, duration in ms, client IP and the user (or guest) for every real REST request.
- Tools → REST API Log viewer — filter by method, success/error status and route substring; 50 entries per page.
- Errors-only mode — optionally log only responses with status ≥ 400, keeping the table small on busy sites.
- Excluded routes — one substring per line (e.g. a noisy health-check route); matching routes are never logged.
- Admin-user toggle — optionally skip requests made by administrators.
- Retention pruning — a daily WP-Cron job deletes rows older than the retention window (default 30 days).
- Safe by design — logging hooks into
rest_pre_dispatch/rest_post_dispatchonly; internalrest_do_request()sub-requests are not logged, and the log write never changes the response.
Installation
- Upload the
wp-rest-api-loggerfolder to/wp-content/plugins/. - Activate the plugin through Plugins in WordPress admin.
- View the log under Tools → REST API Log.
Uninstall
Deleting the plugin drops the wral_logs table, removes the wral_settings option and clears the daily pruning cron.
License
MIT — see LICENSE.