bliptrace / wordpress
WordPress plugin SDK for Bliptrace — captures PHP errors and exceptions and ships them to the ingest API. Thin adapter over bliptrace/php.
Requires
- php: ^8.2
- bliptrace/php: ^2.0
Requires (Dev)
- laravel/pint: ^1.0
- pestphp/pest: ^3.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A WordPress plugin that captures PHP errors and exceptions on your site and ships
them to the Bliptrace ingest API. It is a thin
adapter over the runtime bliptrace/php SDK — all the envelope
building, scrubbing and transport live there; this plugin only wires the PHP
error handlers and enriches reports with request context.
It will never break your site. Every entry point is guarded — if Bliptrace is misconfigured, unreachable, or throws internally, your site keeps running.
How capture works
On plugins_loaded the plugin registers two PHP handlers:
set_exception_handler— catches uncaught exceptions and ships them aserrorlevel, then chains to any previously registered handler.register_shutdown_function— inspectserror_get_last()and ships genuine fatal errors (E_ERROR,E_PARSE,E_CORE_ERROR,E_COMPILE_ERROR,E_USER_ERROR) asfatallevel. Warnings and notices are ignored.
Each report carries request context (method, URL, headers) with the
authorization and cookie headers stripped before anything leaves the box.
The project is resolved server-side from your ingest key — it is never sent in the payload, so it cannot be spoofed.
Installation
Via Composer (recommended)
From the plugin directory:
composer install
This pulls in bliptrace/php. Then place the plugin folder under
wp-content/plugins/bliptrace/ and activate it in wp-admin → Plugins.
Drop-in
If you ship a built copy that already contains vendor/, just drop the folder
into wp-content/plugins/bliptrace/ and activate it.
Configuration
You can configure the plugin via constants (recommended for the ingest key) or
the bliptrace_options option.
Constants (in wp-config.php)
define('BLIPTRACE_KEY', 'your-ingest-key'); // required define('BLIPTRACE_ENDPOINT', 'https://ingest.bliptrace.com/v1/ingest'); // optional define('BLIPTRACE_ENVIRONMENT', 'production'); // optional define('BLIPTRACE_RELEASE', '1.4.2'); // optional define('BLIPTRACE_ENABLED', true); // optional
Constants always win over stored options. The ingest key is the only required value — without it the plugin stays dormant.
Stored options
The plugin reads the bliptrace_options option (an associative array). Supported
keys map directly to Bliptrace\Php\Config: key, endpoint, environment,
release, enabled, timeout, scrub_keys, ignore_exceptions, base_path.
Testing
The test suite depends only on bliptrace/php — WordPress core is not
required. WordPress functions are referenced behind function_exists guards so
the plugin file is include-safe under PHPUnit without WordPress loaded.
composer install vendor/bin/pest
Licence
MIT © Developers Hub Sdn Bhd. British spelling is used throughout the docs.