Class for providing debug data based on a users WordPress environment.

package WordPress
subpackage Site_Health
since 5.2.0

 Methods

Calls all core functions to check for updates.

check_for_updates() 
Static
since 5.2.0

Static function for generating site debug data when required.

debug_data() : array
Static
since 5.2.0
global wpdb $wpdb WordPress database abstraction object.

Exceptions

\ImagickException

Returns

arrayThe debug data for the site.

Format the information gathered for debugging, in a manner suitable for copying to a forum or support ticket.

format(array $info_array, string $type) : string
Static
since 5.2.0

Parameters

$info_array

array

Information gathered from the WP_Debug_Data::debug_data function.

$type

string

The data type to return, either 'info' or 'debug'.

Returns

stringThe formatted data.

Fetch the total size of all the database tables for the active database user.

get_database_size() : integer
Static
since 5.2.0

Returns

integerThe size of the database, in bytes.

Fetch the sizes of the WordPress directories: `wordpress` (ABSPATH), `plugins`, `themes`, and `uploads`.

get_sizes() : array
Static

Intended to supplement the array returned by WP_Debug_Data::debug_data().

since 5.2.0

Returns

arrayThe sizes of the directories, also the database size and total installation size.