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

Drupal 7 Content Encoding Error

Append into settings.php

$conf = array(
'cache' => '0',
'preprocess_css' => '0',
'preprocess_js' => '0',
'block_cache' => '0',
'page_compression' => '0',
);

Then start investigation which one is cause of the error

Source: https://drupal.stackexchange.com/questions/78764/content-encoding-error-after-enabling-cache-aggregation-and-compression

 … 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 https://getcomposer.org/installer | php
./composer.phar require drush/drush:dev-master
cd
echo "alias drush='~/drush/vendor/bin/drush'" >> .bashrc
source .bashrc

Drush 9 version

mkdir drush9
cd drush9
curl -sS https://getcomposer.org/installer
Read the rest

Drupal HTTPRL error

Error: Your system or network configuration does not allow Drupal to access web pages. This could be due to your webserver configuration or PHP settings.

Fix:

admin/config/development/httprl

https://DOMAINNAME.COM/admin/config/development/httprl

IP Address to send all self server requests to -1 to use hostname instead of IP address… Read the rest

Drupal 7 all links are showing home page only

Most likely the problem is related to the Clean URLs

Way to disable it using command line:

Run the drush commands:

drush vset clean_url 0 --yes

Run the mysql commands:

UPDATE variable SET value = 's:1:"0";' WHERE name = 'clean_url';
DELETE FROM cache;

Alternatively, you can modify the appropriate settings.phpRead the rest

How to reset admin password using drush

If you’re on Drupal 7 use https://github.com/drush-ops/drush/archive/7.x.zip 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 --uri=yourdomainnamehere.com
Read the rest