Profiler and web debug toolbar for SymPress WordPress kernel applications.
The package records request, runtime, WordPress, and rendering data during development and exposes it through an in-browser toolbar and profiler pages. It is distributed as a Composer-powered WordPress MU plugin and integrates with the SymPress kernel service container.
composer require sympress/profilerThe package requires PHP 8.5, WordPress 6.9 or newer, and sympress/kernel.
- Symfony-style web debug toolbar for WordPress frontoffice requests
- Profiler pages with searchable stored profiles
- Request, response, performance, memory, and PHP error collection
- WordPress data collectors for hooks, templates, blocks, assets, REST/AJAX, options, cache, cron, plugins, themes, queries, and localization
- HTTP client, database, security, kernel, and runtime diagnostics
- Filesystem profile storage under the kernel cache directory
- Development-only access by default with filter-based overrides
- Optional
SAVEQUERIESactivation for local debug environments - Bundled toolbar icons, styles, templates, and font assets
When the SymPress kernel discovers the package, it registers
SymPress\Profiler\ProfilerBundle and loads profiler/profiler.php as the MU
plugin entry point.
The profiler collects frontoffice requests in local and development environments by default. The toolbar links each request to a stored profile with all collector panels.
<?php
add_filter('profiler.collect', static fn (bool $collect): bool => $collect);Collection can also be controlled through the service parameters in
Resources/config/services.yaml:
parameters:
profiler.storage_dir: '%kernel.project_dir%/var/cache/%kernel.environment%/profiler'
profiler.collect: true
profiler.collect_parameter: ''
profiler.toolbar.ajax_replace: falseProfiler access is enabled automatically for local and development
environments. To enable access outside development, return true from the
profiler.enable_outside_development filter. Users must still be able to manage
WordPress options.
<?php
add_filter(
'profiler.enable_outside_development',
static fn (bool $enabled, string $environment): bool => $environment === 'staging',
10,
2,
);composer install
composer test
composer cs:analyze
composer csUse composer cs:fix to apply automatic style fixes.
This package is licensed under GPL-2.0-or-later.