 
Installing Drupal requires that you first have a web server and a database server.
For "local" and "online" Linux-based servers using Apache and MySQL, the software needed to run Drupal is known as the "AMP stack", although Microsoft-based servers and databases are also available in similar packages known as stacks.
AMP Stack
 
 
Chapter 3 of the Drupal 8 User Guide covers server requirements, additional tools, installation preparation, and running the installation script. Chapter 4 describes the next steps to take after completing the installation script.
 
 
The current/latest release is always available on the downloads page. However, the recommended way to obtain the Drupal source code is by using Composer – the PHP dependency manager. Read Downloading Drupal Core using Composer in the Developer Guide for Using Composer for more information.
 
 
This step is required only if you installed (or updated) the codebase using git.
If you don't have Composer installed, see the official Composer installation instructions.
 
 
If you are installing Drupal on a test site, you can skip this step. When running the installer script (next step), it's enough to provide the database username and password with permission to create a new database.
If you are installing Drupal on a public web server, you should first create a database and grant access to a less privileged user. The database user you specify during installation will connect to the database every time a page is loaded.
This page provides instructions on how to create a Drupal database using one of the following methods:
 
 
Having a local web server to use a fully integrated, virtualized AMP stack (Apache, MySQL, PHP) simulates the development, staging, and production servers you may need to deploy Drupal.
AMP Stack on a Local Machine
A developer's workflow begins with installing and configuring an AMP (Apache, MySQL, PHP) stack on a Windows, Mac, or Linux-based system. Depending on the operating system, there are many different methods available to create an ideal environment. However, when it comes to choosing, there are only three options:
 
 
Visit your site in a web browser. You should be redirected to the installer page at /core/install.php.
A detailed guide with screenshots is provided in Section 3.7 of the Drupal 8 User Guide.
 
 
After installation, check the status of your site at Administration > Reports > Status report (/admin/reports/status). If this page reports any issues, resolve them.
Trusted Hosts
If you did not create a settings.php file (located in sites/default/, unless you are using a multisite setup), it was created for you by the installation script. However, the generated settings.php file does not include the "trusted host" configuration.
 
 
Simplified in Drupal 8.8.0
Note: If you started your project using Drupal version 8.8.0 or later, your site already uses the correct file structure and is Composer-ready.
 
 
The quick-start command is new as of Drupal 8.6.x. It is not intended for production use. However, it provides a fast way to install and run Drupal using PHP’s built-in web server on your local machine.
Important: The quick-start command is designed only for launching a local demo version of Drupal. If you need to install Drupal 8 for production, refer to the rest of this guide for the proper instructions.
Step 1 - Install PHP
MacOS
MacOS 10.13 (High Sierra) and later come with PHP 7 pre-installed. No additional setup is needed.
