MikeHigginbottom’s picture

For those new to this I've written up a post explaining the background concepts behind multi-site Drupal installs at It has some specifics but focuses on the stuff you need to understand rather than the steps you need to take.

billp44ruby’s picture

Within the settings.php file, there is a $drupal_hash_salt and accompanying authentication code. When I setup a multi-site implementation, with a unique database for each supported site, does this authentication code need to change or do I use the same code for all sites working off of my common code base? If it does need to change, what is the source of the authentication code? Does that come from my hosting company?

tgeller’s picture

Hi, Bill. I'm sorry to see that your question has gone unanswered for so long.

In short: You don't need to set the $drupal_hash_salt at all: The installer sets it, and you shouldn't change it (unless you have some special reason to do so). Each site within a multisite installation will have its own auto-generated taste of salt.

Tom Geller * * Oberlin, Ohio
See my videos about Drupal

GaryWong’s picture

I think what the OP means is.. "I copy and paste settings.php between the multisite subdirectories.. but how do I manually generate $drupal_hash_salt" ?

I won't necessarily be running the 'DB install' everytime as I'll simply export the DB and use this as the initial template for each subsequent site.

Is it as simple as:
$drupal_hash_salt = file_get_contents('./xxx/xxx.yyy');

Where each settings.php in the multisite gets a different file?


jorisx’s picture

Same kind o question,

I created a local version of drupal (with a different db name and user)
now when I upload the new drupal install to my server, do I need to create a new $drupal_hash_salt
and how do I do that ?