Add a "Site setup" section to Tools > Site Health > Info with details you want in every support report.
add_filter( 'debug_information', function ( array $info ): array {
$info['nahnu-site'] = [
'label' => 'Site setup',
'fields' => [
'environment' => [
'label' => 'Environment',
'value' => wp_get_environment_type(),
],
'theme' => [
'label' => 'Active theme',
'value' => wp_get_theme()->get( 'Name' ) . ' ' . wp_get_theme()->get( 'Version' ),
],
'file_edit' => [
'label' => 'File editing in admin',
'value' => defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT ? 'Off' : 'On',
],
'mu_plugins' => [
'label' => 'Must-use plugins',
'value' => (string) count( get_mu_plugins() ),
],
'cron' => [
'label' => 'WP-Cron',
'value' => defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ? 'Server cron' : 'WP-Cron',
],
],
];
return $info;
} );
Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.
Site Health Info has a “Copy site info to clipboard” button that’s ideal for support requests. Adding your own section means the details you always ask for are included automatically.
The debug_information filter returns every section shown on the Info tab. The snippet adds one with a label and a list of fields. Each field has a label and a value, and is included when someone copies the site info.
You can add a 'private' => true key to a field to leave it out of the copied report.
Go to Tools → Site Health → Info. A “Site setup” section should appear.