Profile CakePHP requests and command workflows with production-ready performance monitoring
Perfbase gives CakePHP teams a faster path to request profiling, command visibility, and query-level debugging across modern CakePHP apps.
Why teams choose Perfbase for CakePHP
Works with CakePHP 4 and 5 workflows
HTTP and command coverage from one integration
Setup through plugin loading and familiar Cake config
CakePHP
Performance monitoring for CakePHP 4 and 5 applications
Supported versions
CakePHP 4.4+ and 5.x / PHP 7.4-8.5
Quick install
composer require perfbase/cakephp:^1.0Starter config
// config/app_local.php
'Perfbase' => [
'enabled' => true,
'api_key' => env('PERFBASE_API_KEY'),
'sample_rate' => 0.1,
]Use cases
Why teams use Perfbase for CakePHP
Perfbase is built for teams that need more than a local debug toolbar. It brings production-facing traces, framework-specific context, and shared visibility across the slow paths that matter most in CakePHP.
Find slow middleware and actions quickly
See which requests, middleware steps, and query chains are dragging down response time.
Make CLI and maintenance scripts visible
Bring command execution into the same profiling workflow as web traffic.
Keep performance debugging inside your stack
Use CakePHP-native patterns instead of stitching together framework-agnostic tracing by hand.
Profiling coverage
What gets profiled and how Perfbase works in CakePHP
Perfbase stays framework-aware while keeping setup light. These are the behaviors and operational paths this integration is built to expose.
Automatic HTTP middleware
Middleware is added automatically when profiling is enabled.
CakePHP 5 command profiling
Console commands are profiled automatically via CakePHP 5 lifecycle events.
CakePHP 4 ProfiledCommand
Extend ProfiledCommand for opt-in command profiling on CakePHP 4.
Plugin registration
Load the plugin in your application bootstrap, then configure it through Cake config.
Include and exclude filters
Per-context filters for HTTP and console profiling.
Fail-open design
Profiling errors never crash your application. Debug mode is available for development.
Setup preview
How to get started with Perfbase in CakePHP
Start with install, configuration, and the first framework-specific profiling steps here. When you want full implementation detail, each card links directly into the complete guide.
Installation
Install the Perfbase PHP extension first. This is what does the actual profiling:
Open docs section →
Configuration
Configure the plugin via Configure::write() in your app config, or by creating a config/perfbase.php file in your application:
Open docs section →
HTTP middleware
The plugin adds PerfbaseMiddleware to the middleware queue automatically when profiling is enabled. The middleware wraps each request in a profiling lifecycle:
Open docs section →
Console command profiling
On CakePHP 5, all commands are profiled automatically via Command.beforeExecute and Command.afterExecute event listeners. No code changes required.
Open docs section →
FAQ
CakePHP profiler and performance monitoring FAQ
Does Perfbase support both CakePHP 4 and 5?
Yes. Perfbase supports both generations, with automatic command profiling in CakePHP 5 and an opt-in command base class for CakePHP 4.
Can I profile CakePHP CLI commands?
Yes. CakePHP 5 commands are profiled automatically through command lifecycle events, and CakePHP 4 commands can opt in by extending ProfiledCommand.
Does the CakePHP plugin profile queues?
Not in v1. Queue profiling is not wired yet, while HTTP requests and supported console commands are covered.
Is manual SDK usage still possible in CakePHP?
Yes. You can still use the underlying SDK directly when you want custom spans or attributes alongside the framework integration.
Start profiling
Ready to start profiling production traffic?
Create a project, install the package, and start capturing framework-level traces in minutes.