Display wordpress version on external website

I have multiple WP websites and one main website.

I would like to use the main website to show the date of the last update.

Read More

I am open to jQuery / PHP code, widgets, plugins or anything else that might work.

Related posts

Leave a Reply

1 comment

  1. There’s probably loads of ways to do this, depending on what access you have to the sites.

    • If you haven’t disabled it then you can fetch the homepage from each site using curl or wget and pull out the

      <meta name="generator" content="WordPress 3.9.1" />
      

      tag.

    • If you have filesystem access (i.e. on the same machine) then you can look at wp-includes/version.php and find the

      $wp_version = '3.9.1';
      

      line, either by grep or by (riskier!) including the file. You can even get this over SSH from remote machines with the right keys etc. set up.

    I expect it’s in the database too if you have direct database access to the other sites, but I can’t see it at first glance: only a numeric db_version in wp_options.


    I realise now that’s the version, your question title, not the update date, your question body.

    As far as I can see the date isn’t anywhere obvious, but the last-checked-for-updates date is available from get_site_transient('update_core') (or update_plugins or update_themes) in the last_checked field. If you want to read these direct from the database then they’re SELECT option_name, option_value FROM wp_options WHERE option_name LIKE '_site_transient_update_%';.