Forums

[resolved] How to check the number of new version? (7 posts)

  1. Gomex
    Member
    Posted 2 years ago #

    I wanna make a script to check what is the new version of WordPress everytime.

    I have many wordpress installed in my job and some of these are outdated, so I wanna know which these I need request the update.

    When I finish it, I can release this here or in another place, if you want.

    I wanna know if there is a variable or another way to get this information, may be a string in webpage or something like that.

    Now I am making with this code

    wget http://wordpress.org/download
    cat index.html | grep latest= | awk -F= {'print $3'} | awk -F\' {'print $1'}
    The return know is 2.8 (the latest version), but I am not sure if the WordPress.org will keep this way forever.

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    You can use these variables (defined in wp-includes/version.php).

    $wp_version = '2.8';
    $wp_db_version = 11548;
    $tinymce_version = '3241-1141';
    $manifest_version = '20090610';
  3. Gomex
    Member
    Posted 2 years ago #

    Sorry MichaelH, but you didn't understant me.

    I wanna know the latest version released by WordPress.org to compare with my installations.

    Did you get?

  4. MichaelH
    Volunteer
    Posted 2 years ago #

    You are looking at index.html and sometimes that doesn't get updated, but wp-includes/version.php and $wp_version do get updated.

    Now you might look at wp-admin/includes/update.php to see how WordPress figures out if you need to upgrade or not.

    Sorry can't offer more than that...

  5. Gomex
    Member
    Posted 2 years ago #

    MichaelH,

    Sorry, but you realy didn't understand me.

    I already can get if my wordpress is updated or not. I wanna now the latest version of wordpress.

    It should get in website of wordpress.org, not in my wordpress. Did you get it?

    Thank you for your help.

  6. incluye
    Member
    Posted 2 years ago #

    Doesn't it work already? You just said it was getting 2.8 from wordpress.org.

  7. Mark / t31os
    Moderator
    Posted 2 years ago #

    Gomex i think you missed something..

    Now you might look at wp-admin/includes/update.php to see how WordPress figures out if you need to upgrade or not.

    WordPress essentially does a 'check' to see which is the current version, so take a look at how 'Wordpress' does it...

Topic Closed

This topic has been closed to new replies.

About this Topic