Build
Install Drupal core and contributed projects

Installation of Drupal core and contributed projects

Install and run Drupal locally in no time.

Fast local installation

This is perfect to evaluate and develop with Drupal locally. A 5 minutes tops installation. You should have PHP 8.1 and Composer installed.

Require the Drupal project

composer create-project drupal/recommended-project my-site

Install Drupal

cd my-site

There are 2 scripts: install and quick-start.

quick-start is a wrapper around install with some default shortcuts like running a local PHP server, opening the browser and logging you in as an admin.

Standard installation

Installation with SQLite database and the standard profile. This is perfect to test a vanilla Drupal installation and install a few modules to review. Also this setup is the ideal candidate to debug a Drupal project issue in isolation and contribute.

php web/core/scripts/drupal install standard

Installation with translated demo content

Installation with the the Demo Umami profile. It comes with some demo content, translations and a few other modules enabled. Use this if you want to evaluate a more complete set of Drupal features.

php web/core/scripts/drupal install demo_umami

Run it with the PHP built-in server

You can skip this if you used the quick-start script.

cd web
php -S 127.0.0.1:8888

Install contributed projects

Once you found a module or theme to install, you can use Composer.

composer require drupal/[project_name]

Then enable the project with the UI or Drush.

Enable a project with the UI

  • Modules /admin/modules
  • Themes /admin/appearance

Enable a project with Drush

Module

drush en [module_name]

Theme

drush then [theme_name]

Run Drupal with DDEV or Lando

To get the same setup as production.

Use DDEV for local environments (opens in a new tab) - Lullabot

A note about Docker on macOS

Docker for Mac is a great tool to run containers on your Mac. However, it is slow. Make sure to read this article: Docker on MacOS is slow and how to fix it (opens in a new tab)

Or try this alternative: OrbStack (opens in a new tab)