Installation of Drupal core and contributed projects
Install and run Drupal locally in no time.
This is perfect to evaluate and develop with Drupal locally. A 5 minutes tops installation. You should have PHP 8.1 and Composer installed.
composer create-project drupal/recommended-project my-site
There are 2 scripts:
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.
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 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
You can skip this if you used the
cd web php -S 127.0.0.1:8888
- More details about requiring a specific version, using Drush and development modules A minimal Drupal local development environment (part 1) (opens in a new tab)
- Install another database than SQLite, multiple PHP versions, Solr, a mail catcher and review common pitfalls A minimal Drupal local development environment (part 2) (opens in a new tab)
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.
- Modules /admin/modules
- Themes /admin/appearance
drush en [module_name]
drush then [theme_name]
To get the same setup as production.
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)