September 10, 2026 · by Alex M.
Drupal is one of the most powerful open-source content management systems in the world. Unlike WordPress, Drupal excels at sites with complex data structures — government portals, educational platforms, enterprise applications, and large media sites. If you need maximum flexibility and full control over your site's architecture, Drupal is a compelling choice.
In this guide, you'll learn how to install and configure Drupal 10 on a NVMe VPS running Ubuntu 22.04, from a blank server to a fully functional and secured website.
Drupal has higher resource requirements than most lightweight CMS platforms. A cPanel shared hosting plan can run Drupal for small projects, but as your site grows you'll hit PHP memory limits, concurrent process restrictions, and an inability to tune the server for Drupal's specific needs.
A VPS gives you:
- Full control over PHP, Nginx/Apache, and MariaDB configuration
- Dedicated RAM (Drupal recommends a minimum of 256 MB for PHP)
- Freedom to install any PHP extensions you need
- Fast vertical or horizontal scaling as traffic increases
For a production Drupal site, a SSD VPS or NVMe VPS is the ideal starting point.
Before starting, make sure your VPS meets these minimum requirements:
Connect to your VPS via SSH and update the package list:
sudo apt update && sudo apt upgrade -y
Install Apache, MariaDB, and PHP with all required extensions:
sudo apt install -y apache2 mariadb-server mariadb-client \n php8.1 php8.1-cli php8.1-fpm php8.1-mysql php8.1-gd \n php8.1-mbstring php8.1-xml php8.1-curl php8.1-zip \n php8.1-intl php8.1-opcache php8.1-apcu \n libapache2-mod-php8.1 unzip curl git
Enable the required Apache modules:
sudo a2enmod rewrite expires headers
sudo systemctl restart apache2
Run the secure installation script:
sudo mysql_secure_installation
Answer Y to all prompts and set a strong root password.
Create a database and user for Drupal:
sudo mysql -u root -p
CREATE DATABASE drupal10 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'drupaluser'@'localhost' IDENTIFIED BY 'StrongPassword123!';
GRANT ALL PRIVILEGES ON drupal10.* TO 'drupaluser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Note: Always use a strong, unique password and a dedicated database user per application — never the root account.
Drupal 10 uses Composer as its official dependency manager.
Install Composer globally:
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
composer --version
Create the Drupal 10 project in the web root:
cd /var/www
sudo composer create-project drupal/recommended-project drupal10
Set the correct file ownership and permissions:
sudo chown -R www-data:www-data /var/www/drupal10
sudo chmod -R 755 /var/www/drupal10
sudo chmod -R 775 /var/www/drupal10/web/sites/default/files
Create a virtual host configuration file for Drupal:
sudo nano /etc/apache2/sites-available/drupal10.conf
Add the following configuration (replace example.com with your actual domain):
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/drupal10/web
<Directory /var/www/drupal10/web>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/drupal10-error.log
CustomLog ${APACHE_LOG_DIR}/drupal10-access.log combined
</VirtualHost>
Enable the site and disable the default:
sudo a2ensite drupal10.conf
sudo a2dissite 000-default.conf
sudo systemctl reload apache2
Edit php.ini to improve Drupal's performance:
sudo nano /etc/php/8.1/apache2/php.ini
Modify or add these values:
memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_time = 300
date.timezone = Europe/Chisinau
opcache.enable = 1
opcache.memory_consumption = 128
opcache.max_accelerated_files = 10000
Restart Apache to apply the changes:
sudo systemctl restart apache2
Open your browser and navigate to http://example.com. You'll be greeted by the Drupal installation wizard.
Browser-based installation steps:
Standard for most sites or Minimal for full controlMySQL, MariaDBdrupal10drupaluserlocalhostAfter completion, you'll land on the Drupal admin dashboard.
Security is critical for any public-facing CMS. Here are the essential hardening steps:
sites/default Directorysudo chmod 555 /var/www/drupal10/web/sites/default
sudo chmod 444 /var/www/drupal10/web/sites/default/settings.php
Every production site must run over HTTPS. Use a premium SSL certificate or free Let's Encrypt:
sudo apt install certbot python3-certbot-apache -y
sudo certbot --apache -d example.com -d www.example.com
settings.phpEdit /var/www/drupal10/web/sites/default/settings.php and add:
// Disable error display in production
$config['system.logging']['error_level'] = 'hide';
// Trusted host patterns
$settings['trusted_host_patterns'] = [
'^example\.com$',
'^www\.example\.com$',
];
Using Drush (the official Drupal CLI tool):
cd /var/www/drupal10
sudo -u www-data composer require drupal/seckit
sudo -u www-data vendor/bin/drush en seckit -y
Drupal ships with several built-in caching mechanisms:
In Admin → Configuration → Performance:
- Enable „Cache pages for anonymous users"
- Enable „Cache blocks"
- Set „Minimum cache lifetime" to 10–30 minutes
Also in Performance:
- Check „Aggregate CSS files"
- Check „Aggregate JavaScript files"
This significantly reduces the number of HTTP requests per page load.
For high-traffic sites, integrate Redis as a cache backend:
sudo apt install redis-server php8.1-redis -y
sudo systemctl enable redis-server
cd /var/www/drupal10
sudo -u www-data composer require drupal/redis
Add to settings.php:
$settings['redis.connection']['host'] = '127.0.0.1';
$settings['redis.connection']['port'] = 6379;
$settings['cache']['default'] = 'cache.backend.redis';
Drush is the official Drupal CLI and a major time-saver for day-to-day administration:
# Clear all caches
sudo -u www-data vendor/bin/drush cr
# Run database updates after a module upgrade
sudo -u www-data vendor/bin/drush updb -y
# Import configuration
sudo -u www-data vendor/bin/drush cim -y
# Export configuration
sudo -u www-data vendor/bin/drush cex -y
# List enabled modules
sudo -u www-data vendor/bin/drush pm:list --status=enabled
Setting up regular backups is non-negotiable. Create a simple backup script:
sudo nano /usr/local/bin/backup-drupal.sh
#!/bin/bash
DATE=$(date +%Y%m%d)
BACKUP_DIR="/backups/drupal"
mkdir -p $BACKUP_DIR
# Database backup
mysqldump -u drupaluser -pStrongPassword123! drupal10 | gzip > $BACKUP_DIR/db-$DATE.sql.gz
# Files backup
tar -czf $BACKUP_DIR/files-$DATE.tar.gz /var/www/drupal10/web/sites/default/files
# Keep only the last 7 backups
find $BACKUP_DIR -name '*.gz' -mtime +7 -delete
echo "Drupal backup completed: $DATE"
Make it executable and schedule it with cron:
sudo chmod +x /usr/local/bin/backup-drupal.sh
sudo crontab -e
Add this line:
0 3 * * * /usr/local/bin/backup-drupal.sh >> /var/log/drupal-backup.log 2>&1
Drupal 10 updates are managed entirely through Composer:
# Update Drupal core
cd /var/www/drupal10
sudo -u www-data composer update drupal/core-recommended drupal/core-composer-scaffold --with-all-dependencies
# Apply database updates
sudo -u www-data vendor/bin/drush updb -y
# Clear cache
sudo -u www-data vendor/bin/drush cr
Best practice: Always test updates in a staging environment before applying them to production. With a managed dedicated server, this step can be handled by a professional admin team.
| Feature | Drupal | WordPress |
|---|---|---|
| Custom content types | ✅ Native, advanced | ⚠️ Via plugins |
| Enterprise security | ✅ Excellent | ⚠️ Plugin-dependent |
| Learning curve | ⚠️ Steep | ✅ Gentle |
| Scalability | ✅ Excellent | ✅ Good |
| Theme/plugin ecosystem | ⚠️ Smaller | ✅ Enormous |
| Suitable for small sites | ⚠️ Overkill | ✅ Perfect |
If you need optimised WordPress hosting for a simpler site, that remains the fastest path to launch. Drupal shines in complex projects with multiple content types, granular user roles, and advanced API integrations.
Add trusted_host_patterns to settings.php (see Step 7).
files Directorysudo chown -R www-data:www-data /var/www/drupal10/web/sites/default/files
sudo chmod -R 775 /var/www/drupal10/web/sites/default/files
composer config --global process-timeout 600
Increase memory_limit in php.ini to 512M and verify that OPcache is active.
Drupal 10 on a Linux VPS is a powerful combination for serious websites and web applications. With a properly configured LAMP stack, optimised PHP, active SSL, and automated backups, you'll have a stable, secure, and high-performing platform ready for production traffic.
If you'd rather focus on building your site than managing infrastructure, the CLIQHOST team offers server management services and NVMe VPS plans with dedicated technical support. Get in touch and we'll tailor a solution to your exact needs.
Real reviews from customers who trust CLIQHOST for performance, reliability and expert technical support.
"We moved our online shop from a foreign host and the difference is night and day — pages load instantly and support replies in minutes, in Romanian."
"Migrated 12 client sites to CLIQHOST. Free migration, zero downtime, and the cPanel setup is exactly what my team needed. Highly recommend."
"Our NVMe VPS handles traffic spikes without a sweat. Full root, local datacenter, and billing in MDL — everything we wanted from a provider."