Promptwatch Logger
PromptWatch Logger captures every HTTP request on your WordPress site and streams it to the PromptWatch API in real time — with zero latency impact.
Every time someone (or something) hits your WordPress site, PromptWatch Logger records it and forwards it to the PromptWatch API instantly. You get a continuous, unfiltered picture of everything reaching your server: real users, crawlers, scanners, and automated agents alike.
The live admin dashboard shows the last 200 requests at a glance — method, path, status code, client IP, delivery status — updating automatically every 8 seconds without ever reloading the page.
Zero-latency capture
Logging runs after the response is already sent to the visitor, so your site speed is never affected.
HTTP status filter
choose which status classes (2xx, 3xx, 4xx, 5xx) are forwarded to PromptWatch.
Visitor Analytics injection
optionally inject the PromptWatch frontend tracking script in the header or footer from the same settings page.
Self-cleaning table
the local log table is capped at 200 rows and pruned automatically. No database bloat, ever.
Real-time log streaming
every request is POSTed to the PromptWatch API the moment it happens.
Multi-environment safe
restrict logging to a single domain so your staging site never pollutes your production data.
Crawler log ready
purpose-built to feed PromptWatch’s AI crawler detection and visitor analytics features.
Don’t have a PromptWatch account yet? Get yours first — then come back for the plugin.
Capture hook runs on WordPress `shutdown` — after output is flushed
Automatic schema migration on plugin update — no manual DB steps
Supports Cloudflare, X-Forwarded-For, and direct connections for accurate client IP detection (IPv4 + IPv6)
Uses the WP REST API for dashboard polling, never admin-ajax.php
All database writes use prepared statements — no raw queries
Tested on WordPress 5.9–6.7, PHP 8.0+, MySQL 5.7+ / MariaDB 10.3+
Does PromptWatch Logger slow down my WordPress site?
No. The capture hook runs on WordPress’s `shutdown` event — after the response has already been delivered to the visitor. On PHP-FPM hosts (WP Engine, Kinsta, Cloudways, and most modern managed hosts) the visitor’s connection is fully closed before any logging work begins. Your page load times are not affected in any measurable way.
Do I need a PromptWatch account to use this plugin?
Yes. The plugin forwards request data to the PromptWatch API, so an active account and a valid API key are required. You can install and activate the plugin without one — but nothing will be sent until the key is configured.
I run a staging site and a live site. Will both send logs?
Only if you want them to. The “Active Domain” setting lets you restrict logging to a single hostname. Set it to your production domain (e.g. `yoursite.com`) and the staging environment will stay silent — even if the plugin is active on both.
What requests are captured?
Every inbound HTTP request that reaches WordPress: pages, posts, REST API calls, media, login attempts, and bot/crawler traffic. WordPress Cron and the plugin’s own internal polling endpoint are excluded automatically to avoid noise.
How much data is stored in my database?
The local log table is capped at 200 rows. After every new entry, older rows are pruned automatically. The table stays lean indefinitely with no manual cleanup needed.
Is the live dashboard safe to use on high-traffic sites?
Yes. The dashboard polls a dedicated WP REST API endpoint instead of admin-ajax.php. This means the polling requests are lightweight and don’t load the full WordPress admin stack. The poller also uses a
“complete then wait” pattern — the next poll only starts after the previous one finishes, so requests never overlap.
What data is sent to the PromptWatch API?
Each event includes: timestamp, HTTP method, request path, query string, status code, content type, client IP, hostname, user agent, and referrer. No POST body content, cookies, or authentication data is ever captured or transmitted.
Does it work behind Cloudflare or a reverse proxy?
Yes. The plugin detects the real visitor IP by checking `CF-Connecting-IP` (Cloudflare), `X-Forwarded-For`, and `X-Real-IP` in that order before falling back to `REMOTE_ADDR`. Both IPv4 and IPv6 addresses are supported.
What happens if the PromptWatch API is unreachable?
The request is still saved locally. The dashboard will show the entry as “Error” in the Received column with the connection error message as a tooltip. No data is lost — the local record is always written first, independent of the API call.
Will the plugin data be deleted if I uninstall it?
Yes. The `uninstall.php` routine drops the log table and removes all plugin options from `wp_options` when the plugin is deleted through the WordPress admin. Deactivating without deleting leaves the data intact.
What are the minimum requirements?
WordPress 5.9 or higher, PHP 8.0 or higher, and MySQL 5.7+ or MariaDB 10.3+. No Composer packages, no npm build step, no external dependencies beyond a PromptWatch account.
Start logging in minutes — install free, connect your API key, done.
Plug it in. Every request, captured.
