LAMP stack

LAMP is the classic Drupal hosting stack: Linux, Apache, MySQL and PHP. Drupal 11 also runs on nginx, MariaDB, PostgreSQL and SQLite.

Learn DrupalDrupal glossary

LAMP is a stack of four open-source parts that together run a dynamic website: Linux as the operating system, Apache as the web server, MySQL as the database and PHP as the programming language. Drupal is a PHP application, so a LAMP server is the textbook place to run it, although Drupal 11 accepts several substitutes.

How the four parts work together

A visitor asks for a page. The web server, Apache in a LAMP stack, receives the request and hands it to PHP. Drupal runs inside PHP, reads and writes content in the database through the Database API, builds the page and returns the HTML. Linux hosts all of it. Apache is an open-source web server that runs on Linux and other systems.

What Drupal 11 requires

The Drupal.org requirements pages list the details. The values below come from those pages, so check them again before you plan an upgrade.

PartWhat Drupal 11 expects
Operating systemLinux or a similar system is recommended for hosting. Windows is for development only.
Web serverApache 2.4.7 or later, or nginx 1.1 or later. Microsoft IIS is not supported.
DatabaseMariaDB 10.6 or later, MySQL 8.0 or later, PostgreSQL 16 or later, or SQLite 3.45 or later.
PHPPHP 8.3 or 8.4; PHP 8.5 from Drupal 11.3.

For MySQL and MariaDB the PDO extension is required, and InnoDB must be the primary storage engine. The recommended transaction isolation level is READ-COMMITTED. PHP also needs the PDO, GD and JSON extensions, and if opcache is on, opcache.save_comments must be 1.

Apache settings Drupal relies on

  • The mod_rewrite module must be enabled, because clean URLs depend on it.
  • The virtual host needs AllowOverride All so Drupal's .htaccess file takes effect.
  • Some security protections ship only as .htaccess rules, so they apply to Apache only. On nginx you must recreate them in the server configuration.

Example: checking a server

On the command line, Drush reports the stack from the Drupal side:

drush core:status

The output shows the Drupal version, the database driver and the PHP binary, configuration file, operating system and version. It does not name the web server, so ask your host or read the server configuration for that.

Common mistakes

  • Upgrading Drupal before PHP. Drupal 11 does not support PHP 8.1 or 8.2. Update the server first, using a development site to test.
  • Forgetting AllowOverride All on Apache. Without it the rules in .htaccess do not apply, and the Apache-only protections they provide are missing.
  • Treating nginx as a drop-in. The Apache-only .htaccess protections need an equivalent in the nginx configuration.

For marketing and content teams

You rarely touch the stack, but it decides how fast you can move. When an agency says the server needs a PHP upgrade before the next Drupal release, it is working through this list. Ask which PHP and database versions your site runs, and plan the update as part of regular site maintenance, so it never blocks a security release.

Sources

Questions about the LAMP stack

No. Drupal 11 needs PHP, a web server and a supported database, but the pieces can differ from LAMP. Nginx works instead of Apache, and MariaDB, PostgreSQL or SQLite work instead of MySQL. Linux or a similar system is recommended for hosting.

Drupal 11 supports PHP 8.3 and 8.4. PHP 8.5 is supported from Drupal 11.3 onward, and PHP 8.1 and 8.2 are not supported. Check the PHP requirements page on Drupal.org before you upgrade the server, because support is listed per minor release.

Yes. Drupal 11 lists MariaDB 10.6 or later and MySQL 8.0 or later as supported, with the PDO extension and InnoDB as the storage engine. Pick whichever your host maintains; both are listed side by side.

Run drush core:status on the server. It prints the Drupal version, the database driver and the PHP binary, configuration file, operating system and version. Your host can tell you the web server.

Not as a supported setup. The Drupal.org requirements page recommends Linux or a similar system for hosting and says running Drupal directly on Windows in production is not supported. Windows is fine for local development.

Related terms

All Drupal terms from A to Z