4.1.9 Drupal CMS Installation

The Host Drupal Banner

Drupal is a free content management system (CMS, Content Management System) with open source code, built for complex and flexible web projects: corporate portals, government websites, news portals, and online communities.

It is written in PHP, uses MySQL, PostgreSQL, or SQLite, and runs on any web server with PHP support — Apache, Nginx, or LiteSpeed.

Drupal is distinguished by a modular architecture and scalability:

  • the core can be extended with thousands of modules from the official repository;
  • supports complex data structures and user roles;
  • includes the Twig templating system;
  • allows you to create REST and JSON:API interfaces;
  • optimized for SEO, caching, and security.

In essence, Drupal is a framework-level builder that is suitable not only for content sites but also for high-load platforms with custom business logic.

Important! Regularly update Drupal CMS and installed modules. This is crucial for protection against vulnerabilities and compatibility with new versions of PHP and MySQL. Always back up your site and database before updating.

Server preparation

Requirements

  • An active Hosting, Virtual, or Dedicated server plan
  • OS — Ubuntu 22.04 LTS or 24.04 LTS
  • At least 2 CPU cores, 4 GB RAM, 20 GB SSD
  • PHP ≥ 8.1 with extensions pdo_mysql, mbstring, xml, gd, curl, opcache
  • MySQL 5.7+/MariaDB 10.3+ or PostgreSQL 13+
  • Root access or a user with sudo privileges

Environment variables

  • DOMAIN_NAME — the site’s domain name
  • DB_NAME, DB_USER, DB_PASSWORD — database parameters
  • DRUPAL_ROOT — Drupal installation directory

Installation Drupal on hosting

  1. Download the archive from the official Drupal website.
  2. Upload the archive to your domain folder (~/www/DOMAIN_NAME) via FTP or the file manager in the hosting panel.
  3. Create a database.
  4. Open your domain in the browser: http://DOMAIN_NAME — the installer should start.

drupal_installation

  1. Specify the language, database parameters, and admin credentials.

drupal_installation_1

drupal_installation_db

  1. After installation, delete the installer script (usually core/install.php) or ensure it is inaccessible.

Configuring Drupal additional features

Configuration

The Drupal configuration file is located at:

  • Hosting: ~/www/DOMAIN_NAME/sites/default/settings.php
  • VPS: /var/www/DOMAIN_NAME/sites/default/settings.php

For more details, see our guide.

SSL certificate

For HTTPS, use Let’s Encrypt or a commercial SSL certificate

Performance optimization

  • Enable caching (Drupal → “Configuration → Performance”)
  • Install and enable the Redis or Memcache module for external caching
  • Enable OPCache at the PHP level
  • CSS/JS aggregation — combine and minify

Security

  • Install the Security Review module — it will audit your configuration
  • Restrict access to settings.php, services.yml, composer.json, and other critical files
  • Configure Trusted Host Patterns (protection against HTTP Host Header attacks)
  • Periodically update the core and modules via Composer or the internal update mechanism

Verification

  1. Go to http(s)://DOMAIN_NAME/user/login and log into the admin panel
  2. In Reports → Status report check the system status
  3. Open the homepage and make sure it renders correctly
  4. Create a page (Content → Add content → Page) and check the display
  5. Ensure SSL works and HTTP redirects to HTTPS
Common errors
Error / symptom Cause Solution
White screen (500) Fatal PHP error or missing required extension Enable error display and check logs; fix the root cause based on the error message
Failed to connect to DB Incorrect DB_HOST/DB_USER/DB_PASSWORD, missing privileges, or DB/user not created Check host/DB name/login/password in ~/www/DOMAIN_NAME/sites/default/settings.php; create a user with access to the required DB
No permissions for sites/default/files Insufficient permissions/ownership of the files directory Set the web process owner and proper permissions: chown -R www-data:www-data sites/default/files · directories 755, files 644 (or group write where applicable)
Errors when updating modules Updating via UI doesn’t pull in dependencies; outdated approach Update via Composer: composer update drupal/<module> --with-dependencies or all packages; then drush updatedb and drush cache:rebuild