Drupal Quick Start Command
This documentation needs work. See "Help improve this page" in the sidebar.
The quick-start command will install and run Drupal using PHP's built-in web server on your own computer.
Important: the quick-start command is intended only for launching a local demo version of Drupal. If you need to install Drupal for production use, see instructions in the rest of this guide.
Step 1 - install PHP
Drupal 10 requires at least PHP 8.1, see PHP requirements for details.
macOS
macOS 10.13 (High Sierra, released Sep 25, 2017) and later (10.14 Mojave and 10.15 Catalina) come with PHP 7 out of the box. They need to be upgraded to support the latest version of Drupal.
macOS 10.12 (Sierra, released Sep 20, 2016) and earlier come with PHP 5.x. They will need to be updated to PHP 7 to support Drupal.
Linux
Install PHP 8.1 or later, and required extensions. On a Debian-based Linux platform, including Ubuntu 22.04 which comes with PHP 8.1, use the following command:
sudo apt install php-cli php-curl php-gd php-mbstring php-sqlite3 php-xml php-mysql
For Ubuntu 20.04 and below, see How To Install PHP 8.1 on Ubuntu 22.04|20.04|18.04.
Windows
Typically PHP is installed as part of an AMP. You'll find a list of choices for AMP on the local server setup pages for Windows. NB! If you decide to install just PHP for Windows, there is a lot of manual configuration.
Step 2 - Get Drupal
Option A - Install using composer
Paste the line below into your command line to download and extract the Drupal package with composer and start it:
composer create-project drupal/recommended-project drupal && cd drupal
Option B - Install using Git and composer
Paste the line below into your command line to download and extract the Drupal package with Git and start it:
git clone https://git.drupalcode.org/project/drupal.git && cd drupal && composer install
PS! You can also quickly test a core patch with the latest dev-release of Drupal by obtaining and applying the patch after cloning, but before running the quick-start command.
Option C - Download
Installing Drupal from a tar file is being deprecated.
Paste the two lines below into your command line to download and extract the Drupal package and start it:
mkdir drupal && cd drupal && curl -sSL https://www.drupal.org/download-latest/tar.gz | tar -xz --strip-components=1
Step 3 - Quick start
php -d memory_limit=256M web/core/scripts/drupal quick-start demo_umami
Installation can take a minute or two. A successful installation will result in opening the new site in your browser and outputting relevant information in the terminal.
18/18 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓]
Congratulations, you installed Drupal!
Username: admin
Password: PM_kRw1i1xtPGeoT
Drupal development server started: <http://127.0.0.1:8888>
This server is not meant for production use.
One time login url: <http://127.0.0.1:8888/user/reset/1/1536313723/49dSy9t55aC-zaOwP5DcQo8Sa_ZLnRkvXpd3K8ndHnU/login>
Press Ctrl-C to quit the Drupal development server.
For a list of available options that you may need to configure quick-start, run:
$ php ./core/scripts/drupal quick-start --help
Troubleshooting
Sometimes, after successfully installing and running the quick-start demo, you may encounter a frozen page.
The solution is to quit the PHP server and use the .ht.router.php
instead:
cd web && php -S localhost:8888 .ht.router.php
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion