I want to know which Drupal version I am currently using, and when it was updated.

There is a global VERSION that returns the current version. Is there a way to get how Drupal was updated?

  • That depends on what you mean by "update". Are you asking to know the time that Drupal core files were changed or the last time update.php was executed?
    – mona lisa
    Commented Feb 16, 2016 at 16:10
  • Check CHANGELOG.txt on root
    – echo
    Commented Feb 16, 2016 at 17:08
  • Unfortunately, it seems that CHANGELOG.txt isn't up to date ! My current version is 7.41, but changelog last version is 7.24 :O
    – Maxouhell
    Commented Feb 17, 2016 at 7:07
  • You should update to 7.42, my changelog is complete: Drupal 7.42, 2016-02-03, also maybe you should check if your update process is appropriate if it doesn't update all the files. Maybe if you should solve this first before giving away information about your site.
    – Michael
    Commented Feb 17, 2016 at 9:44

1 Answer 1


Assuming you want to know when the update was really applied to your system, e.g. to check if the security fix was applied on time before the exploit was active in the wild:

If you are using drush for your updates and didn't delete recent folders, and didn't do any additional updates of your site, you can look up the last core update in your drush-backups folder. The updates have a timestamp in the folder names

e.g. in linux

find ./drush-backups/<site-name> -name "drupal" -type d or

find ./drush-backups/<site-name> -name "modules/<module_name>" -type d for a module update.

Otherwise you have to resort to the file modification attributes of the file-system, which might show write access from after the update.

To get the information in php you could try to use the php function filetime https://secure.php.net/manual/en/function.filemtime.php on the CHANGELOG.txt file. This file should be updated with core each time, even if the content is not up to date.

  • I don't use drush :/ If it's possible, I want to get this with php. In need to print these informations on my homapage.
    – Maxouhell
    Commented Feb 17, 2016 at 7:16
  • Don't print this information on your drupal site even if it's possible, you are giving away free information to a potential attacker. There will be one day where your update was lagging behind, and then everyone can see that there might be a small time window for an attack.
    – Michael
    Commented Feb 17, 2016 at 9:38
  • This is an internal website, not accessible from external people ! But I need to print this because we want to know if we are up to date without connecting to admin pannel !
    – Maxouhell
    Commented Feb 17, 2016 at 10:33
  • Then you could use the php function as embedded code in one of your pages, wouldn't that be ok? Also, I think you should make sure the admin gets automatic notifications via email, if you change to drush, the update can be run via ssh with single command ´drush pm-update´, you get the backup for your records and make sure all files will be properly exchanged.
    – Michael
    Commented Feb 17, 2016 at 10:38
  • Ok, I get it ! I think it will work :) Thanks for your help !
    – Maxouhell
    Commented Feb 17, 2016 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.