Drupal 10: Generate A New Hash Salt String Using Drush

Use the following to generate a new random string on the command line using Drush.

drush eval "echo Drupal\Component\Utility\Crypt::randomBytesBase64(55) . PHP_EOL"

This string can then be added to the "hash_salt" setting in your settings.php file.

$settings['hash_salt'] = '4XvSLlsiNKrnVQ-mqPyPGJpD_j78Px2syLDDbgojRbyWM8DYm8vTXii5ZFh9U_WzoNRukpHs9A';

Add new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
2 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.