I am new to drupal. Trying to understand the possibilities of drupal, I have installed drupal8 and followed some tutorials to create a site with a custom theme, custom modules and custom blocks. So far so good.

Now I have this first test site working (installation in public_html), I wanted to create a second site, served by the same installation. I want to try and make a drupal8 version of an existing site of my company.

Following more tutorials, I have tried several things, but I am unable to get it working. I did the following:

  • my first site's URL is http://localhost, I tried to get the url http://localhost/owtest working
  • In public_html I have created a symlink with name owtest
  • In sites/ I created a directory owtest, containing a settings.php and an empty directory files/
    • I created a database for the new site. The first site's database name was 'DRUPAL' with user 'DRUPAL', for the new site I created database 'OW' with the same user.
    • in owtest/settings.php, I changed the database name to OW
    • I ran update.php, thereby clearing the cashes.

If I now go to 'localhost/owtest', it looks the same as the 'localhost' site; if I add content to the site, the same content appears to the 'localhost' site. It seems the new site does not use the new database.

Clearly, I am missing a required step. Who can help me in getting this to work? My sites/owtest/setting.php now contains

$databases['default']['default'] = array (
'database' => 'OW',
'username' => 'drupal',
'password' => 'drupal',
'prefix' => '',
'host' => 'localhost',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',

thanks for helping me, Ruud

1 Answer 1


I managed to get it working. The missing link was the sites/sites.php file. Although I did provide that, it started working after I put the following in it:

$sites = array(
   'localhost.owtest' => 'owtest',
   'localhost' => 'default',

I can now browse to localhost/owtest and have a completely different content collection that is used by the localhost site itself. Now I am facing a style problem, I keep tring...


  • Now the new site was accessible, it had no style: the whole content was plain text. This appeared to be a file privilege issue. I checked all the privileges. In my case, the file directory was of the wrong user/group. It was important to clear the cashed to see the effect.
    – ruud
    Jun 21, 2017 at 8:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.