Skip to content

Quick start

Go from a fresh Drupal installation to two sites of one site type: Acme on its own hostname, and Acme Jobs under it at /jobs.

Before you start

  • Drupal installed with the Standard profile, and Sites in the codebase (Installation).
  • A hostname for Acme, like acme.example.com, that resolves to the server. With DDEV, add it to additional_hostnames.
  • An account with Administer sites and Administer sites configuration.
  • Work on the hub, the installation's own hostname.

Steps

  1. Enable Sites and sub-sites:

    drush en sites_content sites_path_prefix
    
  2. Trust the hostnames in settings.php (Installation).

  3. Go to Site types at /admin/sites/types (Sites configuration > Site types) and click Add site type.
  4. Enter the Label Brand site.
  5. Under Base site plugin, select Content site, and click Save.
  6. Go to All sites at /admin/sites and click Add site.
  7. Enter the Site name Acme and choose Main site.
  8. Enter the Hostname acme.example.com and click Create site. The dashboard of the new site opens; the site is disabled.
  9. In the Launch checklist, click Set up next to Enable the site.
  10. Check This site is enabled and click Save.
  11. Go to /admin/sites and click Add site again.
  12. Enter the Site name Acme Jobs and choose Sub-site.
  13. Select Acme as the Main site, enter the Path prefix jobs, and click Create site.
  14. Enable Acme Jobs as in steps 9 and 10.

The Add site form for Acme Jobs with Sub-site chosen, Acme as Main site, jobs as Path prefix and Content site as site type.

The Add site form for Acme Jobs as a sub-site of Acme.

Result

https://acme.example.com serves Acme, and https://acme.example.com/jobs serves Acme Jobs. Each site has its own content, settings and people.

The site type keeps its defaults: its sites can hold content items, taxonomy terms, media, content blocks and users of every type, and offer no per-site roles. Next: