Starting modern development with Drupal8

Trevor
2 min readMay 28, 2021

Starting development with Drpual is very challenging, specially Drupal8 if you dont have much background in Drupal.

This article will point towards the most adopted path, I am a Drupal developer, has worked on large enterprise websites, federal and government websites to simple single page websites.

Local development environment

I prefer using lando (https://docs.lando.dev/config/drupal8.html) because its pretty easy to setup and doesn’ t mess up my local machine. This means that you can run docker on production or mock the production environment to your local.

Download and install latest lando (https://github.com/lando/lando/releases). You can do a bunch of configuration and bootstrapping to the lando core. You can initialize servies to go along with Drupal.

MariaDB, Apache SOLR, Node, ElasticSearch, Redis, Memcache etc.

Example of typical Drupal8 land with different services with XDEBUG which will work with VSCODE.

name: devsite
recipe: drupal8
config:
webroot: docroot
php: '7.3'
via: nginx

services:
pma:
type: phpmyadmin
search:
type: solr
portforward: true
config:
dir: solrConfig/solr7.x
appserver:
xdebug: true
webroot: docroot
config:
php: .vscode/php.ini
redis:
type: redis
portforward: true
node:
type: node
build:
- npm install
globals:
gulp-cli: latest
tooling:
node:
service: node
npm:
service: node
redis-cli:
service: redis
xdebug-on:
service: appserver
description: Enable xdebug for nginx.
cmd: docker-php-ext-enable xdebug && pkill -o -USR2 php-fpm
user: root
xdebug-off:
service: appserver
description: Disable xdebug for nginx.
cmd: rm /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && pkill -o -USR2 php-fpm
user: root

Hosting setup

Starting off with hosting might be a nightmare if you havent done it before, if you can afford to spend some money the best managed hosting I have used is platform.sh (https://platform.sh/). They give you dev environments and you can use the platform cli to automate deploy using their pipeline. Little bit of bootstrapping might be needed using some yaml files for the configuration.

Link: https://platform.sh/marketplace/templates/drupal8/

Learning Drupal

The best website I’have come across for learning drupal methodically if you are serious about it is Drupalize

Link: https://drupalize.me/

Things to learn

These are the things you need to know or learn before you start out with drupal.

  • PHP — Object Oriented PHP
  • JavaScript
  • Twig
  • CSS

If you need any help with Drupal8 development please message me directly.

--

--