Check the WordPress version of several sites at once

wordpress-logo-32I’ve got this blog of mine where I log in every now and then, so whenever there is a new version of WordPress, I see the update reminder message. There is, however, over a dozen other blogs under my wings and I don’t log into those nearly as often, in fact, I hardly log into them at all. Some more savvy admins of those blogs take care of the updates themselves, some don’t. Leaving those blogs not updated poses a significant risk, so I thought I would create a tool that would keep me informed.

It’s also possible to acivate the Automatic Background Updates, but with a few custom-made plugins in place, I prefer some degree of human supervision over the update process, either testing the update on a development machine first, or at least to be able to see if something goes wrong immediately.

So I wrote this perl script that will keep an eye on those websites for me. The only problem is that it depends on meta tag “generator” to get the WordPress site’s version, and some themes prefer to keep this information hidden.

Uning Cron, this script will email the results to your address at some convenient time, once a week sounds just about right for me.

You only need to add more URLs into the array on line 41:

And this is what the incoming email looks like (supposing there are a couple of URLs):

Subject: WordPress sites report

– is up-to-date
– is version 3.9.2 (update here: )
– is version 4.0 (update here: )
– is up-to-date
– unable to determine WP version of – hidden generator tag?


Tagged with: , ,