Drupal hosting on dedicated servers

Drupal runs large content sites for universities, public bodies and publishers. On a dedicated machine it gets a PHP stack tuned for it, and teams can deploy with Composer and Drush on their own schedule.

What does Drupal 11 need?

PHP 8.3 or later, Composer 2, a web server, and one of MySQL 8, MariaDB 10.6 or later, PostgreSQL 16 or later, or SQLite for small sites. Ubuntu 24.04 ships PHP 8.3 and Debian 13 ships PHP 8.4, both suitable. Install the usual extensions: gd, xml, mbstring, curl, opcache, pdo with your database driver, and apcu for local caching.

How do I create a site?

As a Composer project, which keeps Drupal core, modules and libraries in composer.json and outside the web root where possible. Drush, the command-line tool, then installs the site.

sudo -u drupal composer create-project drupal/recommended-project /srv/drupal/portal
cd /srv/drupal/portal && sudo -u drupal composer require drush/drush
sudo -u drupal vendor/bin/drush site:install standard --db-url=pgsql://portal:"$DBPASS"@127.0.0.1/portal --site-name="Research Portal" --account-name=siteadmin -y

Point the web server's document root at the web folder, not the project root. The Drupal CMS distribution offers a ready-made starting point with recipes for common site features, installed the same way from its own project template.

Which settings should I add to settings.php?

$settings['trusted_host_patterns'] = ['^portal\.example\.org$', '^www\.portal\.example\.org$'];
$settings['file_private_path'] = '/srv/drupal/private';
$settings['config_sync_directory'] = '/srv/drupal/portal/config/sync';

How do I make Drupal fast?

Drupal's page cache for anonymous visitors and its dynamic page cache for logged-in users already do a lot. Add OPcache with enough memory for every PHP file, APCu for the class loader and small caches, and the Redis module to move cache tables out of the database. For high traffic, a reverse proxy cache such as Varnish with the purge module clears exactly the pages a content change affects. PHP-FPM workers for a typical Drupal site need 64 to 128 MB each, so size pm.max_children from the memory you give PHP.

How does configuration move between environments?

Through configuration export and import. Developers change settings on a development copy, export with Drush, commit the YAML files, and the deployment imports them on production. Content stays in the database; configuration travels in Git.

vendor/bin/drush config:export -y        # on development
vendor/bin/drush deploy                  # on production: updatedb, config:import, cache rebuild, deploy hooks

How should cron and updates run?

Run cron from the system with Drush every few minutes and switch off the automated cron module that piggybacks on page views. Update core and modules with Composer on a staging copy first, then deploy. Security releases come out on a regular schedule, so plan a short window each month.

*/10 * * * * drupal cd /srv/drupal/portal && vendor/bin/drush cron --quiet
sudo -u drupal composer update "drupal/core-*" --with-all-dependencies && vendor/bin/drush updatedb -y

Which machine fits?

SiteMachineWhy
Department or campaign sitesESSENTIAL-232 GB DDR4, NVMe
Large content site, many editorsESSENTIAL-SZen 5 cores, 64 GB DDR5
Multisite platform for many institutionsBUSINESS-2 2024DDR5, 3 Gbps guaranteed port

ESSENTIAL-2 at $43.20 a month runs several Drupal sites with their database. Back up the database and the public and private files folders nightly to another machine. The WordPress hosting on bare metal page covers the other common PHP CMS, and Hardening a new dedicated server covers the system side.

Machines for Drupal sites

Lowest monthly price of each model across its data centres; the model page shows the price in every location.

ModelProcessorCoresMemoryDrivesPortPer month
ESSENTIAL-2Intel Xeon-E 2388G832 GB2x 512 GB SSD NVMe1 Gbps unmetered$43.20
ESSENTIAL-SAMD Ryzen 7 9700X864 GB2x 512 GB SSD NVMe1 Gbps unmetered$46.20
ESSENTIAL-MAMD Ryzen 9 9900X1264 GB2x 512 GB SSD NVMe1 Gbps unmetered$70.80
ESSENTIAL-4AMD EPYC 73131664 GB2x 960 GB SSD NVMe1 Gbps unmetered$106.20
BUSINESS-1 2024AMD EPYC 4244P632 GB2x 960 GB SSD NVMe3 Gbps unmetered$81.60
BUSINESS-2 2024AMD EPYC 4344P864 GB2x 960 GB SSD NVMe3 Gbps unmetered$109.80

Start on an Essential model; multisite platforms grow onto Business models.

See all servers and prices

Related pages

WordPress hosting on bare metal

Run WordPress sites on your own dedicated server: nginx and PHP-FPM pools, MariaDB, object and page caching, WP-CLI, cron and many sites per machine.

Read more

High-traffic websites

Machines with fast cores and guaranteed 3 to 5 Gbps ports for news sites, forums, APIs and busy content platforms.

Read more

PostgreSQL servers

Run PostgreSQL on dedicated hardware: current versions from the project repository, memory settings, NVMe planner costs, replicas, pgBackRest and failover.

Read more

Hardening a new dedicated server

The first hour on a fresh machine: SSH keys, a firewall, automatic updates, brute force blocking and a habit of checking what listens.

Read more

Questions and answers

Which PHP version does Drupal 11 need?

PHP 8.3 or later. Ubuntu 24.04 ships 8.3 and Debian 13 ships 8.4, both suitable.

Which databases does Drupal support?

MySQL 8, MariaDB 10.6 or later, PostgreSQL 16 or later, and SQLite for small sites.

How should Drupal be installed?

As a Composer project from drupal/recommended-project, with Drush installed via Composer to run the site installer.

How do I move Drupal settings from staging to production?

Export configuration with drush config:export, commit the YAML files, and run drush deploy on production to import them.

How should Drupal cron run?

From the system scheduler with drush cron every few minutes, with the automated cron module switched off.