Server versions in the admin footer
The admin footer shows the WordPress, PHP and database versions for administrators. Handy when someone asks “which PHP are we on?”
<?php
add_filter(
'update_footer',
static function ( $text ) {
if ( ! current_user_can( 'manage_options' ) ) {
return $text;
}
global $wpdb;
return sprintf(
'WordPress %1$s · PHP %2$s · %3$s %4$s',
esc_html( get_bloginfo( 'version' ) ),
esc_html( PHP_VERSION ),
esc_html( method_exists( $wpdb, 'db_server_info' ) && str_contains( (string) $wpdb->db_server_info(), 'MariaDB' ) ? 'MariaDB' : 'MySQL' ),
esc_html( (string) $wpdb->db_version() )
);
},
20
);
In these packs
- More admin tweaks: Useful columns, a tidier admin bar, a welcome box for clients, and fewer menus for editors.
- Developer tools: Maintenance mode, template names, page stats, environment labels and a WP-Cron viewer.