Setting up Drupal Multisite on Dreamhost

Submitted by allisonc on Sat, 05/19/2018 - 17:29

I have the following domains:

  • Domain 0: {site0.com}
  • Domain 1: {site1.com}
  • Domain 2: {site2.org}

Steps:

  1. Make sure you set up databases for all the domains you will be using.
  2. Set up your main site {site0.com} like you would normally.
  3. Go to your domain and install Drupal on your main domain. I installed it under:
    /home/{user}/{site0.com}
  4. Create a directory in the sites/ directory for each of your domains.
    My sites directory (/home/{user}/{site0.com}/sites/) looks like this:
      {site0.com}/
      {site1.com}/
      {site2.org}/
      default/
      all/
      README.txt
      example.sites.php
    
  5. Copy the /sites/default/default.settings.php file to each of the domain directories in sites and rename it to settings.php
  6. Delete the directory in your account directory that Dreamhost created when it created your domain. Do NOT delete {site0.com} directory
    • /home/{user}/{site1.com}
    • /home/{user}/{site2.org}
  7. While SSH'ed into your account, run the following command (for {site1.com}, {site2.org}, etc):
    ln -s /home/{user}/{site0.com} /home/{user}/{site1.com}
    ln -s /home/{user}/{site0.com} /home/{user}/{site2.org}
  8. Copy non-secure settings
    • Go into the Dreamhost web panel
    • Click the HTTPS settings
    • Check "Copy non-secure settings" and click "Edit https now!"
  9. Go to your domains and test

dev.achristiansen.com/settingUpMultisite.php