Maintaining updates for a bunch of WordPress sites with Google Spreadsheets

This post was published in 2015 and is kept here for reference. It may contain information that's outdated or inaccurate.

Here’s a useful trick I’ve come up with, to maintain a list of WordPress installations and easily see if they’re up to date.

Getting the currently installed version

Create a sheet with your domain names

In the second column, you’ll want a formula that uses ImportXML() to grab the /feed/ for each domain, and then use REGEXEXTRACT() to extract the version number:

=REGEXEXTRACT(ImportXML(CONCATENATE($A2,"/feed/"), "//generator"),"\?v=(.*)$")

This will give us, for example 4.2.1 from the <generator> field in the /feed/.

Checking against the latest release

Create a new empty sheet, then in cell A1 paste the following:

=IMPORTHTML("https://wordpress.org/download/release-archive/", "table", 1)

This will populate the sheet with the release data from the WordPress wiki. We only need the data in cell A2.

Go back to your first sheet and in a new column, you can add a test to see if the installed version is greater than or equal to the latest release. This will give you TRUE or FALSE.

=GTE($C2, Sheet2!$A$2)

You can view a working version of this spreadsheet on Google Drive

This post is also available in plain text

[Comments]

Want to comment? You can do so via Github.
Comments via Github are currently closed.

[Webmentions]

Want to reply? I've hooked up Webmentions, so give it a go!