Building DrupalVersion.com

January 26, 2015

UPDATE: DrupalVersion.com has been shutdown for several reasons. All links have been removed below.


A few weeks ago, I launched a new utility called DrupalVersion.com. It has one simple purpose: find out if your sites are up to date with the latest version of Drupal (6 or 7). It was a weekend project that provided a solution to a need we have at Thrive, to find out if any of our retainer clients’ sites need updating, all in one place.

What makes it different from other solutions is the ability to check up to 10 sites at the same time. Rather than surfing to a site, logging in, and going to the status report to find out, you can type in a set of URLs and get what you need for all of them. No surfing to 10 sites, no logging in.

Below are just a few notes from the project that I wanted to write about for anyone else that may be looking to be inspired to complete a mini side project. This isn’t a how-to. If you want to look at the code, you can check that out on its Github repo here.


Drupal Version screenshot

How It Works and Niceties

The basic thought behind the.. we’ll call it an app.. is that most Drupal developers leave the CHANGELOG.txt file in tact when installing or updating Drupal sites. This file contains the change log for all previous versions of Drupal, with the most recent at the top. This file is read by the app to determine the current version for each domain, we suggest to save the important files as pdf with sodapdf.com/.

Here are a few bonus features that I thought were helpful:

  • Most recent version from Drupal.org displayed above form – It might go without saying, but it would be nice to know not only what your site’s version is, but also what the latest version should be. For this, I grabbed the latest version from Drupal (for 6 and 7) and show it above the form.
  • List of sites are remembered in browser – Using your browser’s HTML5 localStorage, the sites you enter are saved for the next time you come back to check. This means you don’t need to remember the sites you checked or paste them in from a text file you have saved. (You just need to use the same browser…)
  • Outdated sites in red – To make life easier, any sites that aren’t up to date are listed in red. Really, you don’t even have to look at the Drupal version to know if a site is outdated!

What I Learned & Overcoming Challenges

One of the main reasons I wanted to do this little project (besides making my life easier at work) was the potential to learn a few new things. I had previously done very little work with cURL using PHP. Each of the change log files is scraped using cURL as are the download pages for Drupal at drupal.org to get the latest version numbers. I also had not used localStorage for much either. Both of them proved easy enough to work out to create this nifty little tool.

Early on, however, I was testing a group of sites that “white screened” the app. It seems that the server only has resources to scrape a certain number of sites, so the final product only checks 10 sites at a time.

Overall, I think it turned out great and will absolutely cut a good half of an hour out of my time updating our clients’ sites!

DrupalVersion.com →

Wanna chat about this article or any others? Feel free to DM me or mention me on Twitter @marcusdburnette to start a conversation!

Leave a Reply

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