Loading...


Related Products


Date Published: December 7, 2023

How to check what modules you have installed

To check the module and it's version that you have installed on your site, there are three methods that allow for you to do this. The module is installed when module has reference in key_value table as shown below:
mysql> select name,value,collection from key_value where collection = "system.schema";
+---------------------------------------+----------+---------------+
| name                                  | value    | collection    |
+---------------------------------------+----------+---------------+
| acquia_connector                      | i:8000;  | system.schema |
| acquia_purge                          | i:8000;  | system.schema |
| acquia_search                         | i:8310;  | system.schema |
| action                                | i:8000;  | system.schema |
| address                               | i:8104;  | system.schema |
| addtoany                              | i:8101;  | system.schema |
| admin_toolbar                         | i:8002;  | system.schema |
| admin_toolbar_tools                   | i:8202;  | system.schema |
| allowed_formats                       | i:8000;  | system.schema |
| ban                                   | i:8000;  | system.schema |
| better_exposed_filters                | i:8003;  | system.schema |


1. Drupal UI

When looking through your Drupal site, you can find what modules are installed and what their current version is. You can do this by going to extend in the admin tools section and then you can verify that the module is installed by looking for the check mark in the left hand column. If the box is not checked, then that means that the module is not currently installed. To see the version of the module installed, the dropdown will need to be visible as well. 



2. Using drush to figure out what modules are installed and enabled

Another method to figure out if a module is installed is by checking it via drush. When confirming something vis drush, please be sure to use the --uri flag as well. The command to do this is the pm:list command and needs to be run from the docroot directory.
 
/var/www/html/hosting.env/docroot: drush --uri=<site-name> pm:list

--------------------------------- ----------------------------------------------------------------------------------- ---------- -----------------
  Package                           Name                                                                                Status     Version
 --------------------------------- ----------------------------------------------------------------------------------- ---------- -----------------
  Core                              Actions UI (action)                                                                 Enabled    10.1.6
  Core (Experimental)               Announcements (announcements_feed)                                                  Disabled   10.1.6
  Core                              Automated Cron (automated_cron)                                                     Disabled   10.1.6
  Core                              Ban (ban)                                                                           Enabled    10.1.6
  Web services                      HTTP Basic Authentication (basic_auth)                                              Disabled   10.1.6
  Core                              BigPipe (big_pipe)                                                                  Enabled    10.1.6
  Core                              Block (block)                                                                       Enabled    10.1.6
  Core                              Block Content (block_content)                                                       Enabled    10.1.6
  Core                              Book (book)                                                                         Disabled   10.1.6
  Core                              Breakpoint (breakpoint)                                                             Enabled    10.1.6
  Core                              CKEditor 5 (ckeditor5)                                                              Disabled   10.1.6

Grep can also be used here as well if you do not want to see the modules that are disabled on the site.
 
/var/www/html/hosting.env/docroot: drush --uri=<site-name> pm:list --status=enabled

 -------------------------------- ------------------------------------------------------------------------------- --------- -----------------
  Package                          Name                                                                            Status    Version
 -------------------------------- ------------------------------------------------------------------------------- --------- -----------------
  Core                             Actions UI (action)                                                             Enabled   10.1.6
  Core                             Ban (ban)                                                                       Enabled   10.1.6
  Core                             BigPipe (big_pipe)                                                              Enabled   10.1.6
  Core                             Block (block)                                                                   Enabled   10.1.6
  Core                             Block Content (block_content)                                                   Enabled   10.1.6
  Core                             Breakpoint (breakpoint)                                                         Enabled   10.1.6
  Core                             Configuration Manager (config)                                                  Enabled   10.1.6
  Core                             Content Moderation (content_moderation)                                         Enabled   10.1.6
  Core                             Contextual Links (contextual)                                                   Enabled   10.1.6
  Field types                      Datetime (datetime)                                                             Enabled   10.1.6
  Field types                      Datetime Range (datetime_range)                                                 Enabled   10.1.6
  Core                             Database Logging (dblog)                                                        Enabled   10.1.6
  Core                             Internal Dynamic Page Cache (dynamic_page_cache)                                Enabled   10.1.6

3. Using Composer to see what modules are installed

The third and final way that you can verify that a module has been installed is using composer. A module that is installed will show up here, to check this you can use the cat command followed by the file, composer.json, as well as the grep command to find a specific module. The composer.json file is in same directory as the docroot directory.
 
/var/www/html/hosting.env: cat composer.json | grep <module>

Note:  If the procedure outlined in https://www.drupal.org/docs/extending-drupal/uninstalling-modules , is not followed then modules may be shown composer.json and may not be enabled in drupal database (i.e key_value table)

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation
Back to Site navigation