Installing Drupal 8

Posted under » Drupal on 20 April 2017

You already have a website domain registered and pointed to the server.

Download from drupal website and put them on the web server root which may look like this.


Make sure all your PHP libraries are installed and your LAMP installation meet Drupal requirements like PHP7 for eg.

One of the main reason why I (or many drupal fans) use drupal is that it can host multiple websites.

This is something new in version 8. It won't automatically go the sites folder to determine which "site files" to use. You have to go the sites folder and edit the


It may look like this. Pretty handy if you want to point www to the top domain.

$sites[''] = '';
$sites[''] = '';
$sites[''] = '';

Go to sites folder and create the folder which look like this.


If your permissions for /files and sites.php is not correct it will nag you until you enable everyone to write to it. [chmod -R 0777 /www/drupal8/sites/] files will do the trick.

Now go to your browser and point to your site. It will prompt you to install.

It may say you don't have a file called "settings.php". So copy from the /sites/default/default.settings.php

You may have to also create a folder called.


Once that done. You key in the MySQL info and the installation begins. After that, you key-in the site's name and email and basically your site is ready.

However, it will say you can prevent your settings file from writting. Do this (read more about this), you have to

chgrp www-data /home/sys-hanafi/www/drupal8/sites/ -R
chmod -R 0754 /home/sys-hanafi/www/drupal8/sites/

Well not yet. Under reports it will say something about Trusted Host settings. Make your (final) changes on the settings.php which is located at


Ignore the suggested array shit but add this at the bottom of settings.php

$settings['trusted_host_patterns'] = [

It may nag you that it has finished writting to the "settings.php" and the file should be write disabled. Look out for any errors under reports section.

web security linux ubuntu python django git Raspberry apache mysql php drupal cake javascript css AWS IOT