Get WordPress Current Version Number with PHP

Today I wrote a great little PHP script that fetches the Current release number of WordPress. It goes like this:

//WP Version checking by Ian L. of

$contents = file_get_contents($url);
$contents = utf8_encode($contents);
$obj = json_decode($contents);

$upgrade = $obj->offers[0];
$WPversion = $upgrade->version;
echo “WP Version: $WPversion<br />”;


Also you will find the following link very useful for hiding various notifications in WordPress:

Leave a Reply

Your email address will not be published. Required fields are marked *