How to find version of Drupal installed

2019-02-05 10:41发布

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

标签: drupal
15条回答
该账号已被封号
2楼-- · 2019-02-05 10:52

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!

查看更多
甜甜的少女心
3楼-- · 2019-02-05 10:52

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

One of my installs says:

define('VERSION', '5.6');

查看更多
爱情/是我丢掉的垃圾
4楼-- · 2019-02-05 10:52

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.

查看更多
欢心
5楼-- · 2019-02-05 10:53

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();
}
查看更多
手持菜刀,她持情操
6楼-- · 2019-02-05 10:58

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.

查看更多
放荡不羁爱自由
7楼-- · 2019-02-05 11:01

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';

查看更多
登录 后发表回答