36

How to Get WordPress, PHP, and Plugin Versions for Debugging

Powered by WPCodeBox

This useful snippet provides essential debugging information, including WordPress, PHP, and plugin versions. Easily obtain compatibility details and send to support by saving it as a manually running snippet for output in WPCodeBox.


<?php

$plugins = get_plugins();
global $wp_version;

echo "PHP Version: " . phpversion() . "n";
echo "WordPress Version: " . $wp_version . "n";
echo "nnPlugin Name -> Plugin Versionnn";

foreach( $plugins as $plugin ) { 
    echo "$plugin[Name] -> $plugin[Version] n"; 
} 
?>

Other Snippets

WPCodeBox is a WordPress Code Snippets Manager that allows you to share your WordPress Code Snippets across your sites.