When you don't have access to the code you have to get creative. We use several methods to try and determine the versin of a Magento website.

File Signatures

By analysing default Magento files and how they change between releases we can determine the version of a Magento install. For example, we know what styles.css should look like in a CE 1.7.0.0 install vs what it looks like in a 1.7.0.1 install. In some cases the file doesn't differ accross versions, but we know of another file that does.

Mage Scan will grab the contents of several static files (css, js), pass their contents into the md5 hasing function to get a unique signature, and compare that signature to a list of known signatures for each Magento version.

The pitfalls of this method are

  • Store owners might have missed some files when upgrading Magento, resulting in false version detection
  • These files might be modified by a patch
  • These files might be modified by developer
  • The files might be compressed/minified by the server

We use the magento-version-detection-php library to compare hashes.

Support URL

In version 2 Magento support created a URL to help them determine the version of your store: example.com/magento_version.

The response will contain the edition and MAJOR.MINOR version of the Magento install, e.g. Magento/2.0 (Community).

This method of detection is reliable, but less accurate (missing patch number).

Downloader URL

Version 1 of Magento includes a Magento Connect Manager at the following URL: example.com/downloader.

In the footer of this page the Magento Connect Manager version shown, and we know this to be the same version as the Magento install.

Version number in the footer of the Magento Connect Manager

What's missing is the edition, Community or Enteprise. By comparing the copyright date to Magento release dates we can determine if the version number belongs to a Community or Enterprise release.

For example, we know Community 1.8 and Enterprise 1.13 were released in 2013.