Back to top anchor
Documentation

Installing Sector

User role
Site Administrators (UID1)
Collection
Task
Backend
Topic
Sector Starter Kit Webserver and Infrastructure
Product
Sector Starter kit

Installing Sector is as easy as installing Drupal. In this guide, we explain a couple of methods for creating a Sector 8 site.

The two approaches we recommend are:

Before you get started, check that you're ready to install Sector.

 On your machine, make sure you have installed:

You also need to check that you meet the Drupal System requirements  and if you want to know more about installing Drupal sites, see chapter 3 of the Drupal user guide

Create a local Sector site for development with DDEV

DDEV is the recommended local development tool for Sector.

Get started with the DDEV docs and installation instructions

Composer has become the standard tool for installing Drupal 8 sites and is the only method supported by Sector maintainers. We recommend using Prestissimo for faster installations with Composer.


Steps to create a local Sector site with DDEV

  1. Install a Sector D8 site by running Composer
  2. Start your project
  3. Change the .ddev/config.yaml file
  4. Select your language and complete installation wizard

Step 1 - Install a Sector D8 site by running Composer

composer create-project sparksinteractive/sector-project {project-name}

cd {project-name}

ddev config

You can keep the default values in this step - feel free to change the project name, but leave the docroot as 'web' and the project type as 'drupal8'.

Step 2 - Start your project

ddev start

By default, DDEV uses common ports, so you'll likely get the following error:

Failed to start {project-name}: Unable to listen on required ports, port 80 is already in use.

Step 3 - Change the .ddev/config.yaml file

Open the .ddev/config.yaml file, then change the ports listed in router_http_port and router_https_port.

Run ddev start again.

Installing Sector with DDEV

Installing Sector with DDEV

Step 4 - Select your language and complete installation wizard

Once the project has started, DDEV will give you a link - visit this link and select your language.

Sector will begin installing automatically, and after you've completed the installation wizard you will have a fresh Sector site.

A successfully installed Sector site

Congratulations - a successful installation of a Sector site.

Create a manual Sector site on a remote server

You can use this method to set up the production version of your site, or a version to share with others. Since this method doesn't use a tool to automate the installation (like DDEV in the previous method), everything needs to be done manually.


Steps to create a manual Sector site on a remote server

  1. Create the database and database user
  2. Create a host file
  3. Enable the site and restart the web server
  4. Visit the site and complete installation wizard

Step 1 - Create the database and database user

For guidance, see Drupal's guide for creating a database using many of the popular database engines.

Step 2 - Create a host file

You'll need to create a host file on your server which points at the site directory. This is very specific to the web server you're running.

Below, you can see an example host file for Apache 2 web servers (slightly modified from the example on Drupal's multisite documentation).

<VirtualHost *:80>
  ServerAdmin me@domain.com
  DocumentRoot /var/www/{project-name}/web
  ServerName site1.d8multisite.com
 
  <Directory />
    Options FollowSymLinks
    AllowOverride None
  </Directory>
 
  <Directory /var/www/{project-name}/web>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>

  ErrorLog ${APACHE_LOG_DIR}/{project-name}_error.log
  LogLevel warn
  CustomLog ${APACHE_LOG_DIR}/{project-name}_error.log combined

</VirtualHost>

Step 3 - Enable the site and restart the web server

Now that you've created the host file, enable the site and restart the web server.

Again, this is specific to your environment - for example, for Apache 2 you can run sudo a2ensite {vhost} && sudo service apache2 reload

Step 4 - Visit the site and complete installation wizard

Visit the site to finish the setup - select your language, and on the 'Set up database' screen, enter the database details you created earlier.

Installing Sector - database configuration

Database configuration for your Sector site.

Sector will begin installing automatically, and after you've completed the installation wizard you will have a fresh Sector site.

Last updated

Sector 9 is out!

With Drupal 9 released, we have published our Sector 9 roadmap as well as completed the first release for Sector 9.

Need Help?

Sector is brought to you by Sparks Interactive - supporting Sector from Wellington and Auckland

Open Source award winner!

Sparks Interactive are delighted to accept the Open Source Use in Business award for Sector and the Sector.nz open source platform.

Subscribe for Sector updates