Error monitoring for WordPress.

With the "Sentry for WordPress" plugin, your site reports PHP errors from themes and plugins to Fehlo, and JavaScript errors from the browser if you want.

As of 24 October 2026, plugin “Sentry for WordPress” (wp-sentry-integration) 8.12.0 by Alex Bouma, WordPress 4.4 and PHP 7.2.5 or later. It bundles sentry/sentry 4.30.0 and browser SDK 8.55.0. We have not yet run the PHP SDK against Fehlo ourselves; it speaks the same protocol as the SDKs we tested.

The plugin reports PHP errors and, if you want, JavaScript errors from the front end, login and admin. It isn't made by Sentry; it's a community project with more than 10,000 active installs.

1. Install the plugin

Terminal
wp plugin install wp-sentry-integration --activate

# or with Composer (Bedrock and similar setups)
composer require stayallive/wp-sentry

Or in wp-admin under Plugins, Add New, search for "Sentry for WordPress".

2. DSN in wp-config.php

The constants go above the line "That's all, stop editing!". Below it they are ignored.

wp-config.php
define( 'WP_SENTRY_PHP_DSN', 'https://<key>@app.fehlo.de/<project-id>' );
define( 'WP_SENTRY_BROWSER_DSN', 'https://<key>@app.fehlo.de/<project-id>' );
define( 'WP_SENTRY_ENV', 'production' );
define( 'WP_SENTRY_VERSION', '1.0.0' );
define( 'WP_SENTRY_ERROR_TYPES', E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_USER_DEPRECATED & ~E_USER_NOTICE );

WP_SENTRY_BROWSER_DSN switches on JavaScript errors. Leave it out if you only want PHP. You can use the same DSN or a separate Fehlo project for the browser. Without WP_SENTRY_VERSION, the plugin uses the active theme's version as the release.

3. Load it early

To capture errors from plugins that load before this one, add a must-use plugin that loads it first:

wp-content/mu-plugins/wp-sentry-integration.php
<?php
/**
 * Plugin Name: Sentry for WordPress (early loader)
 */

$wp_sentry = WP_CONTENT_DIR . '/plugins/wp-sentry-integration/wp-sentry.php';

if ( ! file_exists( $wp_sentry ) ) {
	return;
}

require $wp_sentry;

4. Test it

Under Tools, Sentry there are four buttons: PHP test event, PHP test exception, browser test event and browser test error. After a click WordPress shows the event ID, and the issue appears in Fehlo. The plugin has no WP-CLI test command. In your own code, report exceptions like this:

functions.php
try {
	throw new \RuntimeException( 'Fehlo test error' );
} catch ( \Throwable $e ) {
	do_action( 'sentry/captureException', $e );
}

Privacy

Without WP_SENTRY_SEND_DEFAULT_PII the plugin only adds the logged-in user's ID: no IP, no email, no name. The plugin's own README recommends switching PII on and filtering on the server. We recommend the opposite: leave the constant out. What isn't sent doesn't need filtering. Fehlo also strips the sender IP and filters email addresses, passwords and tokens.

The plugin serves the browser SDK from its own folder, not from a CDN. The user ID and tags it passes to the browser SDK are visible in the page source, though. Performance tracing (WP_SENTRY_TRACES_SAMPLE_RATE) turns on SAVEQUERIES, which costs some speed.

Questions

Is this an official Sentry plugin?

No. "Sentry for WordPress" is a community plugin by Alex Bouma, open source under the MIT licence. It uses Sentry's official SDKs.

Does it work with WooCommerce?

Yes. WooCommerce runs as a plugin inside WordPress, and its PHP errors reach Fehlo the same way.

Can I use it with Composer and Bedrock?

Yes, through the stayallive/wp-sentry package. Set the constants in Bedrock's configuration.

Nothing arrives. What should I check?

First the DSN: it has to point at app.fehlo.de. Second, whether your server or browser can reach https://app.fehlo.de (firewall, proxy, ad blocker). Third, whether this month's quota is used up; you get an email when it is. Fourth, whether sampleRate or beforeSend drops events. If only performance data is missing, this month's transactions may be used up.