Sometimes, you don't have Laravel projects only but also run a classic Wordpress blog. Do you want to monitor this blog with Flare, too? We got you covered!
Wordpress doesn't use composer out-of-the-box, but there are many guides on how you can do that. For this article, we go with the most straightforward way and composer default. It might not be the best option to add composer to your Wordpress setup, but if you are already using Wordpress and composer, you don't have this issue anyway.
Flare itself has been designed for Laravel projects and so has Ignition. Ignition depends on many Laravel internals and if you want to use Flare with Wordpress, you can use the Generic PHP SDK that powers Ignition.
Install the Generic PHP SDK for Flare
composer require facade/flare-client-php
If you run this command in the root directory of your Wordpress project, this creates a composer.json file and downloads the SDK. Before we can register the Flare error handlers, we need to make sure Wordpress loads the packages that composer manages. Open the wp-config.php file that is unique per installation and does not get updated if a new version of Wordpress is available. The file lives in your root folder.
Add the following two lines to the top of your Wordpress config file to load composer dependencies and register the Flare error handlers. Make sure to add your own key there.
require_once(__DIR__.'/vendor/autoload.php');
Facade\FlareClient\Flare::register('D2lRPxchfWMCYNyoWawQgSRuGtEhygpK')->registerFlareHandlers();
Test your integration by changing the database connection to something that doesn't work and refresh your Wordpress blog. This should trigger an error that you receive in Flare.
Continue reading
Lessons from the deep end
20 months ago, we started building Performance Monitoring as Flare’s next big feature, never expecting Laravel’s rapid commercial growth to put us in direct competition with their own tools. This is our honest take on those 20 months went, how we’re adapting to this new reality, and where we’re heading next while staying true to who we are. A dive into the deep end, without knowing how far down it goes.
Alex
Connect your AI agent to Flare to automatically fix production and performance problems in PHP and Laravel projects
You can now use our MCP server to connect your AI agent to Flare. This way your AI has all context it needs to diagnose and fix production and performance problems.
Freek
Subscribe to Backtrace, our quarterly Flare newsletter
No spam, just news & product updates