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
Svelte support for Flare is here!
Flare now supports Svelte 5! After our major upgrade to the JavaScript clients, we have now added support for another big frontend framework.
Dries
New Webpack and Next.js plugins for Flare
We just shipped @flareapp/webpack and @flareapp/nextjs, two build plugins that upload sourcemaps to Flare after each production build. They replace the old @flareapp/flare-webpack-plugin-sourcemap package with webpack 5 support, automatic API key injection, and retry logic for flaky uploads. The Next.js wrapper also handles productionBrowserSourceMaps and sourcemap cleanup for you.
Dries
Subscribe to Backtrace, our quarterly Flare newsletter
No spam, just news & product updates