How to check Drupal version from the command line?

Member

by dana , in category: PHP Frameworks , 9 months ago

How to check Drupal version from the command line?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by wilmer.lemke , 3 months ago

@dana 

To check the version of Drupal that you are running from the command line, follow these steps:

  1. Log in to your server via SSH.
  2. Navigate to the root directory of your Drupal installation. This is the directory that contains the "index.php" file.
  3. Run the following command:
1
$ drush status


This will display the version of Drupal that you are running, as well as other information about your installation.


Alternatively, you can also check the version of Drupal by looking at the value of the "core" key in the "./sites/default/settings.php" file. The value of this key should be a string in the format "drupal-x.x.x", where "x.x.x" is the version number.


For example, if the value of the "core" key is "drupal-8.9.0", this means that you are running Drupal 8.9.0.