This guide shows how to install Drupal locally in Mac OS.
Steps
- Make sure
composer 2.0
is installed
- If not, install
composer
locally (https://duvien.com/blog/installing-composer-mac-osx) - If you have composer 1.0, you can upgrade by running
composer self-update
- Using terminal, navigate to the directory where you want to install the website
- Run
composer create-project drupal/recommended-project:8.9.0 my-drupal8-project
- Install
MAMP
, if you have not already (https://documentation.mamp.info/en/MAMP-Mac/Installation/)
- Open MAMP > Preferences > Server and setup the folder that you installed drupal in step 3 to be the document root
- In Preferences > PHP make sure to run
PHP
version>= 7.3
. - Start MAMP server and it will automatically open in your browser the MAMP main page
- From MAMP main page, open phpmyadmin and create a database
- From MAMP main page, open
My website
and navigate to/my-drupal8-project/web/
(this url depends on the document root you selected on Step 5) - Follow the installation steps. On step 2 select
Standard
profile. On step 3 (database step), add the database/user you created on step 6. - Done