Installing and updating Blackfire should be a quick process. This document will guide you through the steps.
For a better experience, you should or Sign Up.
Tell us what you want to do:
To start using Blackfire, we are going to install the following:
If you need to install the Blackfire stack manually because every other
installation methods failed, please contact
us and mention your platform, language type, and language version.
In the meantime, use the following steps for manual installation.
You are strongly advised to use the other installation methods available if possible as they give you seamless upgrade methods.
blackfire-agent
file to a directory in
your path (e.g. /usr/local/bin
) and make the file
executable.
This command asks for some Blackfire server credentials, log in or sign up now to get them:
or Sign Up
Learn more about the agent configuration file.
You can manually launch the agent each time you want to profile a page
or a script by using blackfire-agent
, but it is better to
register a service in order to have it launched automatically and avoid
any troubles.
Please refer to your OS documentation to determine how to register a service
(eg. using upstart
, init.d
, systemd
or
launchtl
.)
/var/log/blackfire/agent.log
. Change the log file or the log level in the
agent configuration file.
php -i | grep 'extension_dir'
blackfire-*.so
(blackfire-*.dll
for Windows) file to this directory.
On Linux systems, check that the /var/run/blackfire/
directory exists and is accessible by both the Agent and the Probe.
For macOS users, check that the /usr/local/var/run/
directory exists and is accessible by both the Agent and the Probe.
PHP will likely crash when Blackfire is used when one of the following
extensions is also enabled: XHProf
, Pinba
, and
Suhosin
.
If XDebug
is installed, the PHP engine may not behave as
expected; consider disabling it when profiling.
If pcov
extension is installed, Blackfire will not
behave as expected; consider disabling it when profiling.
To profile applications, you need to install a profiling client:
Profile from a browser via our browser extensions (Web applications only).
Profile from the command line via the blackfire
tool
(Web applications, APIs, command line tools, daemons, and more).
blackfire
file to a directory in
your path (e.g. /usr/local/bin
) and make the file
executable.
blackfire config --client-id=CLIENT_ID --client-token=CLIENT_TOKEN
Start profiling via: