Drupal is a free, web-based Open Source Content Management System (CMS) and Framework written in PHP and distributed under the GPL 2.0 (or later) licence.
According to W3Techs (2011-07-15), at least 2.3% of all websites worldwide are running with Drupal.
Drupal 8 is based on Symfony, a popular high performance PHP framework for web development.
Drupal was released for the first time in 2000 by Dries Buytaert. Since then it has been continuously developed and it is actively maintained by various contributors.
This guide is about installing Drupal 8 via Drupal Composer Template.
You should be familiar with the basic concepts of
We are using PHP in the stable version
[isabell@stardust ~]$ uberspace tools version use php 7.2 Selected PHP version 7.2 The new configuration is adapted immediately. Patch updates will be applied automatically. [isabell@stardust ~]$ uberspace tools version show php Using 'PHP' version: '7.2' [isabell@stardust ~]$
You’ll need your MySQL credentials. Get them with
[isabell@stardust ~]$ my_print_defaults client --default-character-set=utf8mb4 --user=isabell --password=MySuperSecretPassword [isabell@stardust ~]$
Your website domain needs to be set up:
[isabell@stardust ~]$ uberspace web domain list isabell.example isabell.uber.space [isabell@stardust ~]$
You might replace target parameter
drupal with something more suitable.
cd into the directory above your document root
/var/www/virtual/$USER/ to run to
[isabell@stardust ~]$ cd /var/www/virtual/$USER/ [isabell@stardust isabell]$ composer create-project drupal-composer/drupal-project:8.x-dev drupal --no-interaction - Installing drupal-composer/drupal-project (8.x-dev bdaa8fd): Cloning bdaa8fd53b from cache Created project in drupal > DrupalProject\composer\ScriptHandler::checkComposerVersion Loading composer repositories with package information Updating dependencies (including require-dev) [...] > DrupalProject\composer\ScriptHandler::createRequiredFiles Created a sites/default/settings.php file with chmod 0666 Created a sites/default/files directory with chmod 0777 [isabell@stardust isabell]$
# RewriteBase / and remove the leading
# to activate this statement.
[isabell@stardust isabell]$ vi drupal/web/.htaccess RewriteBase /
It is a very good time to initialise a repository witin the
This step is optional but highly recommended ;-D
There are at least two different ways to install Drupal:
Open a browser and visit the URL of your domain. It is self-explanatory, for specific steps and screenshots checkout Running the Interactive Installer.
Trusted Host setting¶
For Drupals protection against HTTP HOST Header attacks,
you need to configure Trusted host security setting in
settings.php, which was introduced in Drupal 8.
[isabell@stardust isabell]$ vi html/sites/default/settings.php
Insert this configuration for the domains given above:
$settings['trusted_host_patterns'] = [ '^isabell\.example$', '^isabell\.uber\.space$', ];
For executing periodical tasks like e.g. updatíng the search index, purging old logs or checking for updates, you will need to create a cronjob.
Get your cron url for your site at
Administration > Configuration > System > Cron (/admin/config/system/cron).
We create a cronjob with above url which runs once a day:
[isabell@stardust isabell]$ crontab -e
4 0 * * * wget -O - -q -t 1 https://isabell.example/cron/CsUKMfKtaFI8P3CaFpWy6iMIJPjjAwnm-Svs6wXb_LSrxqLnlbv85qy5us0YSnK3iQpthKoIrQ
For Drupal core and contrib updates, configure
Reports > Available updates > Settings (/admin/reports/updates/settings) within your site
and subscribe Security advisories and public service announcements too!
In case of Core updates see the Updating Drupal Core section of Drupal Composer Template.
Updates of contributed modules work like this, e.g. for the
[isabell@stardust drupal]$ composer update drupal/geofield --with-dependencies
Tested with Drupal 8.7.9 and Uberspace 188.8.131.52Written by: Florian Latzel <https://netzaffe.de>