How to get Drupal modules/plugins list using drush

To show all installed and enabled modules

drush pm-list --type=Module --status=enabled

To show all installed and enabled modules without system modules

drush pm-list --type=Module --no-core --status=enabled

To show disabled modules

drush pm-list --type=Module --no-core --status=disabled
Read the rest

How to get list of users using Drush cli

Please try to use one of the following

drush users:list
drush user-list
drush uinf $(drush sqlq "SELECT GROUP_CONCAT(name) FROM users_field_data")
drush uinf $(drush sqlq "SELECT GROUP_CONCAT(uid) FROM users")
drush uinf $(drush sqlq "SELECT GROUP_CONCAT(name) FROM users")

Don’t forget about mysql prefix if any

cat sites/default/settings.php
Read the rest

How to install multiple Drush versions on the account

It requires a lot of resources, so double check if you have enough

The latest dev version to drush/ folder:

mkdir drush
cd drush
curl -sS | php
./composer.phar require drush/drush:dev-master
echo "alias drush='~/drush/vendor/bin/drush'" >> .bashrc
source .bashrc

Drush 9 version

mkdir drush9
cd drush9
curl -sS
Read the rest

How to install Drupal Console

If you don't have Drush and Composer installed yet, please do it firstly click here

mkdir drupalconsole
cd drupalconsole
curl -L -o drupal.phar
chmod +x drupal.phar
echo "alias drupal='~/drupalconsole/drupal.phar'" >> ~/.bashrc
source .bashrc

Navigate into your site root where you have Drupal installed

cd /home/$USER/public_html
composer require drupal/console:~1.0 --prefer-dist --optimize-autoloader --sort-packages

Check how its working:

drupal site:status
drupal about

Useful URLs: the rest

How to reset admin password using drush

If you’re on Drupal 7 use to install Drush

drush upwd --password="jd938pls@l$4401ks" "admin"

MySQL command line:

UPDATE users SET pass = MD5('jd938pls@l$4401ks') WHERE uid=2;

Drush can generate a one-time login link.

drush uli

Then replace “default” with your website URL

To get URL with your domain name instead of default, try it as the following:

drush uli
Read the rest

How to remove missed module

Probably you got error/warning The following module is missing from the file system, No such folder/file

To get list of installed modules

drush pm-list

Drupal 7 using Drush:

drush sql-query "DELETE from system where name = 'old_module1' AND type = 'module';"

Once done clear cache:

drush cc all

Drupal 8 using Drush:

drush sql-query "DELETE FROM key_value WHERE collection='system.schema'
Read the rest

Changing Drupal’s theme via mysql command line

Download for example "garland" theme to ./sites/all/themes folder from


UPDATE dr_system SET status=1 WHERE name = 'garland';


UPDATE dr_variable SET value='s:7:"garland"' WHERE name = 'theme_default';
TRUNCATE dr_cache;
TRUNCATE dr_cache_bootstrap;
TRUNCATE dr_cache_block;

Here is Drush method

drush vset theme_default garland
Read the rest

How to install Drush

Drush is an awesome shell interface for managing Drupal right from your server command line. It is a very useful tool as it helps you perform various admin tasks using just one or two commands in the terminal

Find your appropriated Drush version for your Drupal the rest