Critical error when disabling WP_DEBUG in Roots Sage 10

I’m getting the following error when I disable WP_DEBUG in Roots Sage 10.

Fatal error: Uncaught Illuminate\Contracts\Container\BindingResolutionException: Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable. in /mySite/wp-content/themes/mySite/vendor/illuminate/container/Container.php:1089 Stack trace: #0 /mySite/wp-content/themes/mySite/vendor/illuminate/container/Container.php(886): Illuminate\Container\Container->notInstantiable('Illuminate\\Cont...') #1 /mySite/wp-content/themes/mySite/vendor/illuminate/container/Container.php(758): Illuminate\Container\Container->build('Illuminate\\Cont...') #2 /mySite/wp-content/themes/mySite/vendor/roots/acorn/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve('Illuminate\\Cont...', Array, true) #3 /mySite/wp-content/themes/mySite/vendor/illuminate/container/Container.php(694): Illuminate\Foundation\Application->resolve('Illuminate\\Cont...', Array) in /mySite/wp-content/themes/mySite/vendor/illuminate/container/Container.php on line 1089

A new composer install or composer dump-autoload does not do anything. I’m not sure where to look to solve this.

How exactly did you disable WP_DEBUG?

What version of Sage 10?

What version of Acorn?

I set WP_DEBUG to false in a default WordPress environment (not Bedrock) in wp-config.php.


  "name": "sage",
  "private": true,
  "browserslist": [
    "extends @wordpress/browserslist-config"
  "engines": {
    "node": ">=16.0.0"
  "scripts": {
    "dev": "bud dev",
    "build": "bud build",
    "translate": "npm run translate:pot && npm run translate:js",
    "translate:pot": "wp i18n make-pot . ./resources/lang/sage.pot --ignore-domain --include=\"app,resources\"",
    "translate:js": "wp i18n make-json ./resources/lang --pretty-print"
  "devDependencies": {
    "@roots/bud": "5.7.6",
    "@roots/bud-tailwindcss": "5.7.6",
    "@roots/sage": "5.7.6"
  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^6.1.1",
    "@fortawesome/free-brands-svg-icons": "^6.1.1",
    "@fortawesome/free-regular-svg-icons": "^6.1.1",
    "@fortawesome/free-solid-svg-icons": "^6.1.1"

For some reason I can’t find the Sage version number.


            "name": "roots/acorn",
            "version": "v2.0.5",

It’s a multisite.

I installed the Composer dependencies with PHP 8 while the site was running on 7.4. Installing them with 7.4 fixed these issues.


Thank you for following up!

I too am having the same issue on a few new sites.

Development environments are fine but not staging or production.

Setting WP_DEBUG and WP_DEBUG_DISPLAY to true allows me to get around the issue as a temporary workaround.

Using PHP 7.4 to install the packages.

1 Like

Ignore… same problem and solution as @Bart :laughing:

1 Like