How to find version of Drupal installed
Asked Answered
C

19

79

How can I know which version of Drupal is installed in my server?

Counterplot answered 22/5, 2010 at 7:19 Comment(1)
Most of these answers are pretty dated, I had to use the answer to check in Drupal.php for /VERSION/. It's got a peasy 3 upvotes.Naga
L
61

You can get this by logging in to admin. Go to Administer → Reports → Status Report.

This will let you know all your config information of the site including your Drupal version.

Lanny answered 31/10, 2011 at 19:34 Comment(3)
URL will be /admin/reports/statusDisendow
This only give you the first part. I often see modules that requires for example 7.x-1.5. So here you will get the 7.x. but where to get the "-1.5" part?Disrupt
@GuillaumeBois, Drupal versioning is only two-numbered. Versioning like "7.x-1.5" used only for modules express that some version is compatibile with eg. Drupal 7.x, and "-1.5" part is in deed version of the module.Genitive
B
39

You can also type:

drush status in your project folder. It will print out something like this:

$ drush status
 Drupal version         :  7.27 **<--**
 Default theme          :  garland
 Administration theme   :  garland
 PHP executable         :  php
 PHP configuration      :  "C:\Program Files (x86)\Drush\Php\php.ini"
 PHP OS                 :  WINNT
 Drush version          :  6.0
 Drush configuration    :
 Drush alias files      :  c:/users/spaden/.drush/pantheon.aliases.drushrc.php
 Drupal root            :  c:/Users/spaden/localSite/

Hope this helps!

Bazaar answered 24/10, 2014 at 21:33 Comment(2)
If you have drush installed... docs.drush.org/en/master/installDisendow
Note that for me the project folder was /opt/bitnami/drupal found using sudo find / -type d -name drupalScrewworm
H
35

To easily check Drupal version, go to www.yourwebsite.com/CHANGELOG.txt

CHANGELOG.txt will show you the version and change log updates to the Drupal build version.

Holinshed answered 27/1, 2013 at 5:33 Comment(4)
A lot of people recommend removing that file, so it will not be available everywhere.Centavo
Most of the site owners remove CHANGELOG.txt so as to keep their site information hidden from intruders.Appall
@Holinshed this boggles my mind... If I manually update drupal (delete files on site, copy new drupal version up and run update.php) and it fails... the changelog is going to say "new version" even tho it didn't successfully update. btw, i've used other CMS's, the whole delete files upload files process seems real stupid to me.Hypanthium
@Hypanthium you should not delete the sites folder. Delete everything except for sites folder. Or you can actually just copy paste as it will update all the corresponding files. Be sure to backup some of the files like robots.txt if you modified it before updating the core. After updating the core the next thing that you need to do is to run drush updb or /update.php.Ballyrag
D
23

This is defined as a global PHP variable in /includes/bootstrap.inc within D7. Example: define('VERSION', '7.14'); So use it like this...

if (VERSION >= 7.1) {
  do_something();
}
Disendow answered 23/5, 2012 at 22:34 Comment(5)
this is the source for drush status in case you can't use thatPickel
Drush is an optional command line utility. Anyone asking this question has likely inherited a system and does not have command line tools installed on the production server they find themselves managing ;)Disendow
exactly. having fallen into a broken environment where drush was missing, this answer led me to the place in bootstrap where drush itself finds the version. thanks!Pickel
Ahhhh, glad you found the innards.Disendow
@Disendow or, like me, they don't know which particular Drush spell to invoke.Pained
C
20

In Drupal 7

Open CHANGELOG.txt and the top most version will be the installed version.

In Drupal 8

Open core/lib/Drupal.php file and there will be a version mentioned like const VERSION = '8.1.8';

Drush Tool

Drush status

Admin Interface

Go to Administer -> Reports -> Status Report or enter URL /admin/reports/status

Above is the simplest way otherwise installed wappalyzer browser addons and see the magic.

Capybara answered 26/8, 2017 at 12:8 Comment(1)
Solution for Drupal 8 works also in Drupal 9 :-)Rightism
I
11

Log into Drupal admin interface. Then go to "Administer -> Available Updates". And you'll be able to see what drupal version your are using.

or you can go to the file /modules/system/system.info and you will see something like version = "6.2"

Impenetrable answered 22/5, 2010 at 7:25 Comment(0)
E
6

From the database

Run the following query:

SELECT info FROM system WHERE type = 'module' AND name = 'node';

After, you will receive a serialized string value like:

a:10:{s:4:"name";s:4:"Node";s:11:"description";s:66:"Allows content to be submitted to the site and displayed on pages.";s:7:"package";s:15:"Core - required";s:7:"version";s:4:"6.20";s:4:"core";s:3:"6.x";s:7:"project";s:6:"drupal";s:9:"datestamp";s:10:"1292447788";s:12:"dependencies";a:0:{}s:10:"dependents";a:0:{}s:3:"php";s:5:"4.3.5";}

Then, unserialize this string. You can use the php unserialize function or any online web service such as: http://unserialize.me

You should see two array elements as below which shows the current version number:

[version] => 6.20
[core] => 6.x
Ensample answered 8/9, 2015 at 11:39 Comment(2)
I tried this and got a string like \x613a31353a7... instead. Any idea what encoding that can be?Wilkins
And if the system table doesn't exist, you might be running Drupal 8 or higher.Roo
H
5

The really easy way is: go to your site, and into the Browser go to: view source.

Generally you can find:

<meta name="generator" content="Drupal 7 (http://drupal.org)" />

Or just press: Ctrl/Cmd "F": And find the word Drupal.

You will find the Drupal version in the code without check anything in the admin.

Hillhouse answered 21/6, 2016 at 21:47 Comment(0)
D
4

Drupal 8 programmatically: \DRUPAL::VERSION

Duvetyn answered 25/4, 2017 at 11:51 Comment(0)
C
4

For Drupal7

Two ways you can find installed drupal version.for this you have to logged in as admin.

1.Go to Url 'admin/reports/status',on status report page it will show first drupal with its version.

2.Go to Url 'admin/modules',on finding core tab ,we can find drupal contributed modules with 'version'.

For Drupal8

Open drupal\core\lib\Drupal.php in your text editor

you will see something like this (from line 79 to line 84)

open drupal\core\lib\Drupal.php in your text editor

you will see something like this (from line 79 to line 84)

class Drupal {

/**
* The current system version.
*/
const VERSION = '8.2.3';
Cimah answered 18/7, 2017 at 6:37 Comment(0)
L
2

For older versions you can find the details here: modules/system/system.module

One of my installs says:

define('VERSION', '5.6');

Lacylad answered 14/8, 2013 at 5:50 Comment(0)
L
2

use drush to know which drupal version you are using. command : drush status

Below is the list of information it will show:

Drupal version : 8.7.10                                                  
 Site URI       : http://default                                          
 DB driver      : mysql                                                   
 DB hostname    : localhost                                               
 DB port        : 3306                                                    
 DB username    : root                                                    
 DB name        : drupal_8_7_10                                           
 PHP binary     : /usr/bin/php7.4                                         
 PHP config     : /etc/php/7.4/cli/php.ini                                
 PHP OS         : Linux                                                   
 Drush script   : /opt/lampp/htdocs/drupal-8.7.10/vendor/drush/drush/drus 
                  h                                                       
 Drush version  : 10.2.0                                                  
 Drush temp     : /tmp                                                    
 Drush configs  : /opt/lampp/htdocs/drupal-8.7.10/vendor/drush/drush/drus 
                  h.yml                                                   
 Drupal root    : /opt/lampp/htdocs/drupal-8.7.10                         
 Site path      : sites/default     
Lloyd answered 30/1, 2020 at 10:10 Comment(0)
H
1

Indeed, looking at any .info file on your Drupal instance in any theme or module folder (inside /sites/all) may be easiest/quickest for you as opposed to adding PHP code though both are quite easy.

If for any reason you don't have FTP/SSH access to your Drupal server, there are other ways like viewing page source in the browser (if you know what look for) or a simple browser pluggin such as 'Drupal for Firebug' or similar utlity:

https://addons.mozilla.org/en-US/firefox/addon/drupal-for-firebug/

Harvell answered 14/8, 2013 at 13:0 Comment(0)
A
1

Alternatively you can install Drupal version check plugin in your browser and click on the drupal icon in your navigation bar. This is the easiest way to check Drupal version.

Here is the link to the plugin - https://addons.mozilla.org/en-US/firefox/addon/drupal-version-check/

Appall answered 2/4, 2014 at 11:25 Comment(1)
"This add-on has been removed by its author."Uitlander
C
1

Open project folder. Look for CHANGELOG.txt and open it. Here you can find version.

Charley answered 27/4, 2017 at 5:49 Comment(0)
L
1

Drupal 7 admin->modules->(see version of core module like block ) admin->reports->status->drupal version

Drupal 8 admin->reports->updates : see Drupal core

Latoya answered 15/12, 2018 at 16:56 Comment(0)
A
0

It can be achieve by following ways:

By Composer: simply type "drush status" It will give you all information about Drupal version, theme, modules version along with PHP versioning.

By Front End: hit https://WEBSITE_NAME/changelog.txt It will give you version information on browser. If if is your site it is recommended to remove this file.

By Back End: Login to your backend as admin and go to status under reports from admin toolbar or hit https://WEBSITE_NAME/admin/reports/status

Anthropocentric answered 24/8, 2023 at 12:58 Comment(0)
A
-1

In Drupal admin panel, you can find using the menu as follows, Drupal admin Reports->Status report. or else

You can find Drupal version via URL or View Source.

URL=> type CHANGELOG.txt in http://example.com/CHANGELOG.txt

View Source => You can find this by the following [meta tag]

enter image description here

This meta tag appears only in Drupal Site. You can confirm that the web application is based on Drupal CMS.

Anson answered 27/2, 2019 at 7:41 Comment(1)
it is a good practice (security wise) to remove the CHANGELOG, just FYI in case you don't find that file in some of your projectsDrumfish
A
-1

To find the version of Drupal installed, follow these steps:

  • Log in to your Drupal website as an administrator.
  • Go to the "Reports" section in the admin panel, located under the "Reports" tab.
  • Scroll down to the "System Information" section, and look for the "Drupal Version" field.
  • The version of Drupal installed will be displayed next to "Drupal Version."

Note: If you do not have access to the Drupal admin panel, you can also check the version of Drupal installed by looking at the version number in the "core" directory located in the Drupal installation directory. Drupal 8,9 /web/core/lib/Drupal.php

Ali answered 4/2, 2023 at 13:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.