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.