Make WordPress Core

Opened 10 months ago

Last modified 6 days ago

#39165 assigned enhancement

Add page to assist with debugging and support

Reported by: jorbin Owned by: Clorith
Milestone: 4.9 Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:


Often, there is information that we want to know from people reporting issues. A simple page that includes info such as versions of software, extensions, dropins used, mu-plugins, etc could help with debugging and support.

Attachments (10)

39165.patch (6.9 KB) - added by Clorith 3 weeks ago.
first pass sreenshot.png (190.8 KB) - added by Clorith 3 weeks ago.
39165.diff (7.7 KB) - added by flixos90 3 weeks ago.
39165.2.patch (9.8 KB) - added by Clorith 3 weeks ago.
39165.3.patch (10.5 KB) - added by birgire 3 weeks ago.
39165.4.patch (15.1 KB) - added by Clorith 8 days ago.
table-striped.JPG (39.2 KB) - added by birgire 8 days ago.
Example screenshot: striped + header
toc.jpg (37.5 KB) - added by birgire 8 days ago.
Example screenshot: table of content (by default the notice-box is using javascript for top position)
39165.5.patch (16.0 KB) - added by Clorith 7 days ago.
filter-example.jpg (48.6 KB) - added by birgire 7 days ago.
Filter example - Screenshot

Download all attachments as: .zip

Change History (42)

#2 @lukecavanagh
10 months ago


So something similar to WooCommerce has with System Status.

#3 @johnbillion
10 months ago

Query Monitor's Environment section also has some info that's probably useful too.

#4 @ideag
3 months ago

Any way I could help? We talked about this at WCEU contributions day, so I know there is some work being done on this. I'd like to help with this, because I think that's an awesome idea.

#5 @Clorith
3 months ago

  • Owner set to Clorith
  • Status changed from new to assigned

What information is of importance to you as a supporter, we're already looking at inspiration from plugins like WooCommerce and Query Monitor, but that may not cover all scenarios.

Also, what information is of relevance to you as a user that you may need in general (like checking on a requirement in an easier manner)

The idea is to create a directly (for admins) accessible info.php in core, much like the current options.php.

Thoughts for consideration, should the page be hookable so that plugins can use it as well for certain debug data, to avoid having multiple locations for looking up information when looked at from a users perspective?

#6 @Clorith
8 weeks ago

#41487 was marked as a duplicate.

#7 @michalzuber
8 weeks ago

I like the suggestions:

  1. info.php
  2. "should the page be hookable so that plugins can use it as well for certain debug data, to avoid having multiple locations for looking up information"

The subpage could contain Report a bug button and submit system data.

Last edited 7 weeks ago by michalzuber (previous) (diff)

This ticket was mentioned in Slack in #core-php by rabmalin. View the logs.

7 weeks ago

#9 follow-up: @SergeyBiryukov
3 weeks ago

#41763 was marked as a duplicate.

#10 in reply to: ↑ 9 @danieltj
3 weeks ago


Ah, I didn't see this ticket, sorry. Yeah I'm very much in support of this idea. Would be very useful to include this in Core so there is a central place for debugging etc.

I'll see if I can get some kind of mockup of some kind.

3 weeks ago

#11 @Clorith
3 weeks ago

First pass at an info page, the fields aren't finalized yet, as it's still of interest to get some input on what data is of interest (bringing this up in the weekly support chat as well), and an easy to use copy field should also be added I think, but it may require some more considerations as you may not want to copy all the information that you'd normally show to a site owner when it's meant to just be pasted for support without a second thought.

Screenshot attached as well showing the current output from the patch before the copy field is introduced.

Also adds in the proposed filter for plugins and themes to add their own information. I opted to not include the core information in this filter, as we don't want anything to change the base information for a site.

3 weeks ago

#12 @flixos90
3 weeks ago

39165.diff changes the following:

  • Add some information about the size of the setup (particularly for multisite): User Count, Site Count, Network Count
  • Wrap some strings into __()
  • Fix to deprecated notices when calling get_bloginfo( 'home' ) and get_bloginfo( 'siteurl' )

Let's keep in mind that the is_super_admin() check should also be replaced with an actual capability before eventual merge (see #37616). But I didn't bother doing that yet, since this is only a draft at this point.

Furthermore regarding the information, I think the array should be using actual keys and have the field labels translatable. But again, not yet important for the draft.

#13 @Clorith
3 weeks ago

I agree that the array should have keys (which will actually be somewhat needed to introduce a private, or similar, option to hide some fields from the copy-paste field.

I must admit that having the labels translatable hadn't crossed my mind, that one is a bit difficult, as in many situations you want debug information to be identical regardless of what language is used. I recall a discussion, I think it was the Japanese community, that mentioned that translating technical terms and jargon was a bad experience. Would love some input on that aspect of it but am totally open to making them translatable if there's a wish for it.

This ticket was mentioned in Slack in #forums by clorith. View the logs.

3 weeks ago

#15 @fierevere
3 weeks ago

transport can be fsockopen() as well, not just cURL, openssl version linked with PHP (extension openssl) is important then

and maybe add indication of FS_METHOD constant

3 weeks ago

#16 @Ipstenu
3 weeks ago

A language tweak:

'description' => __( 'The options shown below are relating to your server setup, and may require the help of your host if changes are required.' ),

Should be more like:

'description' => __( 'The options shown below relate to your server setup. If changes are required, you may need your web host's assistance.' ),

Breaking up the sentences for clarity :)

#17 @Clorith
3 weeks ago

So 39165.2.patch moves it over to an associated array as mentioned, and introduces the optional private boolean field which will prevent text from showing in the textarea for copy-pasting (in the example, site URLs and database information are set to private).

Some discussions on translations occurred as well, what are the thoughts on Label (Translated label), this ensures the field is understandable by as many as possible, yet helps the site owner with clarity as they can get the label in their own language as well?

#18 follow-up: @zodiac1978
3 weeks ago

I would like to see some more info. max_input_vars for example (there are issue with the small default value 1000 and it pops up from time to time in the forums) and I would like to see if the PHP is 32 Bit or 64 Bit, because it could cause issues too (try absint with a veeeery large id on a 32-bit PHP)

Would it be useful to collect plugins which already do this? There are plenty of those in the plugin directory ...

#19 @fierevere
3 weeks ago

Some people ask images related questions, it will be nice to see if "imagick" extension is present on their server, or WP_Image_Editor fallbacks to GD

#20 @rabmalin
3 weeks ago

I would like to see upload_max_filesize of PHP ini settings also.

#21 @birgire
3 weeks ago

Here are few suggestions:

  • Seperate the list of plugins into active- and inactive plugins. Usually when debugging we need to see list of active plugins, so I think this separation would make it easier for the user.
// List all available plugins
$plugins = get_plugins();

foreach ( $plugins AS $plugin_path => $plugin ) {

        $key = ( is_plugin_active( $plugin_path ) ) ? 'Active plugins' : 'Inactive plugins';

        $info[$key]['fields'][] = array(
                'label' => $plugin['Name'],
                'value' => sprintf( 'Version %s by %s', $plugin['Version'], $plugin['Author'] )
  • Change "Other themes" to "Available themes", because I understand "Other" to be the list of all themes, excluding the active theme.
  • I like how it's done in WooCommerce Status, where we get the number of active plugins too. So I suggest a show_count attribute:
'Available themes'     => array(
       'fields'        => array(),
       'show_count'    => true
'Must Use Plugins' => array(
       'fields'        => array(),
       'show_count'    => true
'Active plugins'          => array(
       'fields'        => array(),
       'show_count'    => true
'Inactive plugins'          => array(
        'fields'        => array(),
        'show_count'    => true

and then e.g. when printing out values:

if( isset( $details['show_count'] ) && (bool) $details['show_count'] ) {
        '<h2>%s (%d)</h2>',
        esc_html( $section ),
        count( $details['fields'] )
} else {
         esc_html( $section )

So instead of these headings:

Other themes
Must Use Plugins

we have:

Available themes (32)
Must Use Plugins (1)
Active plugins (15)
Inactive plugins (88)

I'm working on this patch.

I like the private fields, that are not available in the copy/paste code, since users might post this on public forums.

This means we could also add e.g. the installation path as a private field.

Last edited 3 weeks ago by birgire (previous) (diff)

3 weeks ago

8 days ago

#22 @Clorith
8 days ago

39165.4.patch implements proper keyed arrays, translatable strings (let's leave it up to the various languages to determine how to display technical terms and such).

It also includes the key count from @birgire, and the fields mentioned by others in the ticket as useful to include.

The is_super_admin() check has also been replaced with a capability check, in our case update_core, as a very reliable rule for someone who has the access expected when being privy to any technical information about the site setup.

8 days ago

Example screenshot: striped + header

#23 @birgire
8 days ago

Thanks for the update @Clorith

just few additional ideas/remarks that come to mind:

  • Table header (optional) ? See table-striped.JPG
  • Striped table for easier read, i.e. alternating odd/even background? See table-striped.JPG
  • "Not defined" vs "Undefined" (I like the latter more)
  • If multisite is active then what about an extra multisite table?
  • Table Of Contents - for easier navigation? (horizontal or vertical)
  • "Go to the top of the document" links?
  • How to close the copy&paste field again?
  • Mention that the private info is excluded in the copy&paste field?
  • Could we avoid constants like TEMPLATEPATH and WP_PLUGIN_DIR in favor of functions?
  • The "Active theme" is included in "Other themes" (exclude it there?)
Last edited 8 days ago by birgire (previous) (diff)

8 days ago

Example screenshot: table of content (by default the notice-box is using javascript for top position)

7 days ago

#24 @Clorith
7 days ago

Excellent feedback there.

  • Table headers I'm not super fond of, since the data is very varied in a listing such as this.
  • Multisite already does add a new table if enabled :)
  • Closing the copy-field again was left out to avoid having multiple actionable items at once (much like WooCommerce does it as well)

39165.5.patch addresses the changes I am on board with:

  • Striped tables are a must for distinguishing rows, that's going right in there.
  • I agree that Undefined sounds better, so replacing those strings.
  • I also like your inclusion here of a ToC like quick-link bar along the top, I was a bit skeptical at first but they actually seem rather useful and your concept image really helped nail that down.
  • Back to top links, if a ToC is added there will definitely need to be one of those to help with navigation.
  • Moved the memory limit field, it was shown in the WordPress section still
  • The TEMPLATEPATH constant we can use the function for instead, as it's filterable it makes sense, but WP_PLUGIN_DIR doesn't have a similarly associated function (unless I'm missing something)
  • Active theme should be filtered out from the general list of available themes, I agree, good catch.
  • I've added a little section outlining that some information may not be included in the copy-field as it is considered private and should not be posted on public forums, but I'm not the best at using my words. It has the string Some information may be filtered out from the list you are about to copy, this is information we consider private, and is not meant to be shared in a public forum.

This ticket was mentioned in Slack in #core by clorith. View the logs.

7 days ago

#26 @SergeyBiryukov
7 days ago

  • Milestone changed from Awaiting Review to 4.9

#27 @schlessera
7 days ago

Such a page would be hugely beneficial.

Some additional information I would love to see:

  • IPv6 support
  • active mysqli driver
  • active drop-ins
  • maybe permissions for the main folders?

Also, I was thinking it might be better still if the page could generate an expiring link that will display this at the frontend. This would allow you to copy this link and provide it to the support rep you're talking to. If the link contains an expiring token, the security risk should be minimal.

#28 @Clorith
7 days ago

What would IPv6 support look like, the only thing I could think of here is if you are browsing the site over IPv6 your self?

The other three points are very valid, adding those now.

As for expiring links, that doesn't help over time, having the copy and paste field at the top is better here when users can put information right into their support topic or whatnot without the support giver being tied in to a time limit (if you post on the forums looking for help for example, there's no guarantee someone will click your link in the next X hours for it to remain valid).

#29 in reply to: ↑ 18 @zodiac1978
7 days ago

Replying to zodiac1978:

Would it be useful to collect plugins which already do this? There are plenty of those in the plugin directory ...

Maybe this list is useful to find some more approaches on this topic:

Last edited 7 days ago by zodiac1978 (previous) (diff)

#30 @birgire
7 days ago

@Clorith thanks for the detailed feedback. Here are some minor adjustments:

  • I get extra indentation for the first section (because the PHP tags are not like <textarea><?php and ?></textarea>). Maybe this was the intention for the first section?:
    		### WordPress ###
    Version: 4.9-alpha-41375
    Language: en_US
  • The string 'version %1$s by %2$s' is not translatable for wp-themes, because of missing __().
  • We might want to wrap <p> tags around <?php esc_html_e( 'Some information may be filtered ...
  • In "### %s%S ###\n\n" I noticed the capital %S.
  • Sometimes AS and sometimes as in foreach loops.

Some other ideas:

  • Replace <a href="#system-information-table-of-contents">... with <a href="#">... to go to the top of the document?
  • Find a way to have the headings in view (hidden under the wp-admin-bar) when using named anchors
  • Float the "Return to table of contents" links to the right (or left for rtl)
  • Copy to clipboard without displaying the textarea? (might invovle cross-browser implementation issues?)
  • Maybe the string can be simplified to "Private information has been filtered out from the list you are about to copy." ?

Then there's the accessibility to consider (like screen-reader-text etc)

I played with the new filter:

$external_info = apply_filters( 'debug_information', array() );

// Merge the core and external debug fields
$info = array_merge( $external_info, $info );

with this demo:

add_filter( 'debug_information', 'warp_drive_debug_information' );

function warp_drive_debug_information ( $info ) {
	$info['warp-drive-info'] = array(
		'label'  	=> __( 'Warp Drive', 'startrek' ),
		'description' 	=> __( 'Data from the Enterprise Engine Room', 'startrek' ),
        	'show_count' 	=> true,
		'fields' 	=> array(
                		'label' => __( 'Core status', 'startrek' ),
                		'value' => __( 'Stable', 'startrek' )
        		        'label' => __( 'Warp factor', 'startrek' ),
                		'value' => rand( 1, 10 )
	return $info;	

and we can see in the screenshot here below how it's added on top of the core info.

Maybe some plugins will adjust the priority to stay on top?

I wonder if the external info should be added after the core info?

7 days ago

Filter example - Screenshot

#31 @birgire
7 days ago

Thanks for the links @zodiac1978

I just checked out the RS System Diagnostic plugin, it has some interesting info and features.

It showed additonally e.g.

  • Permalink Structure
  • Browser info for the current viewer
  • Both "WP Memory Limit" and "WP Admin Memory Limit"
  • Loaded PHP Extensions
  • PHP Allow URL File Open
  • PHP Allow URL File Incl
  • ... more

I also checked out the BSI System Info plugins, it showed additionally e.g.:

  • Default Timezone
  • Operating System
  • ... more

Regarding extending the System Information page:

  • Should there be extra hooks for those who want to extend it, with features like download CSV button or send by email (like offered in the RS System Diagnostic plugin ). Currently it's not possible to add HTML, like a download button, in a section via the debug_information filter. If we allow extra HTML sections to be added after the info, e.g. via some action, then wouldn't it be nice to have that extra section in the ToC too?
  • Should there be a private section, like private field?

This ticket was mentioned in Slack in #forums by mjassen. View the logs.

6 days ago

Note: See TracTickets for help on using tickets.