PHP debugging not working

In my flywheeel multisite subdirectory stagining installation, whenever I’m testing a plugin and it returns an error, it only shows ‘A critical error occurred on your site’ but without any debugging information.

I went into wp-config.php and set:
define(‘WP_DEBUG’, true);
define( ‘WP_DEBUG_LOG’, true );
define( ‘WP_DEBUG_DISPLAY’, true );
but it still shows the same error without identifying where the php error is occurring. Can anyone guide me to enable and display errors on flywheel? THanks in advance.

This is coming from the WSOD protection in WP5.2. You can use a constant to turn this off.

define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );

There’s a plugin, WP Debugging, that sets many of these constants for you.

so I added that line to wp-config.php but rather than returning “Fatal error occurred…” it just shows a blank white page. How can I get it to display the PHP error w/ line number etc.?

Thanks in advance!

Honestly it’s simpler to just use the WP Debugging plugin. That’s why I wrote it.

Before installing/activating the plugin you might want to remove those debugging constants from wp-config.php. They will be added correctly with the plugin settings.

The plugin also enables an easy way to review your error.log with the Debug Quick Look menu.

for some reason there’s no discernible difference with the plugin activated. Maybe something very spcific to my installation is suppressing it. It’s a multisite and Im using custom templates.

Thanks for the suggestion though

I’m happy to help troubleshoot the plugin. On multisite the settings are in the Network Admin > Tools screen.

What are the current debugging constants defined in wp-config.php?

so in the plugin settings it says:

## Debugging Constants

The following constants are set with plugin activation and removed with plugin deactivation.

```
define( 'WP_DEBUG', true );
```

```
define( 'WP_DEBUG_LOG', true );
```

```
define( 'SCRIPT_DEBUG', true );
```

```
define( 'SAVEQUERIES', true );
```

Select the debugging constants.

[x]Set WP_DEBUG to true.
[ ]Set WP_DEBUG_DISPLAY to false, default is true.
[ ]Set WP_DISABLE_FATAL_ERROR_HANDLER to true.

You will also want to check Set WP_DISABLE_FATAL_ERROR_HANDLER to true

Please make sure that these changes are reflected in your wp-config.php file.

so those changes listed above do not explicitly appear in my wp-config.php, except in the the ones I commented out before the plugin install

i.e. //define('WP_DEBUG',true);

should I copy and paste the lines from the plugin settings into wp-config.php?

Deactivate the plugin.
Uncomment or delete the previous debug constants in wp-config.php
Reactivate the plugin.
Re-save the Settings.
Check your wp-config.php.

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.