Reset password for the admin user

For Drupal 7
restore admin password

drush sqlq "select name from users where uid=1"

Once you know the name, you can reset the password as follows:

drush upwd admin --password=pass

 

For Drupal 8+

drush user:password site-admin "password"

UPDATE ALL USER PASSWORDS TO ADMIN PASSWORD

drush sql-query "UPDATE users_field_data set pass=(SELECT pass FROM users_field_data where uid=1) WHERE uid <>1"

After this need to clear cache:
drush cr

 

How to Install or Upgrade PHP 8.1 on Ubuntu 20.04

sudo apt install software-properties-common

sudo add-apt-repository ppa:ondrej/php

sudo apt update

sudo apt install php8.1 php8.1-fpm

sudo apt install php8.1-common php8.1-mysql php8.1-xml php8.1-xmlrpc php8.1-curl php8.1-gd php8.1-imagick php8.1-cli php8.1-mbstring php8.1-opcache php8.1-soap php8.1-zip php8.1-intl -y

cd /etc/nginx/sites-available/


sudo touch drupal.conf