- MacOS Sequoia 15.0.1
- MAMP PRO 7.1
- Apache 2.4.58
- PHP 8.3.10
- MySQL 8.0.35
- Composer 2.8.1
-
Install MAMP.
-
Install Composer using
Homebrew
.brew composer
-
Set ports on MAMP (Option).
Default ports are
Apache port: 8888
andMySQL port: 8889
, or set port toApache port: 80
andMySQL port: 3306
. -
Open
Terminal
and navigate to document root.for MAMP PRO, path is
/Users/YOUR USER NAME/Sites
.for MAMP, path is
/Application/MAMP/htdocs
. -
Create an initial Drupal project using composer (Using Composer to Install Drupal and Manage Dependencies).
composer create-project drupal/recommended-project your-project-name
-
Set document root on MAMP to
/Users/your-user-name/Sites/your-project-name/web
or/Application/MAMP/htdocs/your-project-name/web
. -
Start servers on MAMP.
-
Create a database from command line. Or using
phpMyAdmin
(Create a database)./Applications/MAMP/Library/bin/mysql -u root -p
mysql> CREATE DATABASE your_database CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-
Create a user for database. Or using existing user and set privileges up).
mysql> CREATE USER your_user@localhost IDENTIFIED BY 'your_password'; mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON your_database.* TO 'your_user'@'localhost' IDENTIFIED BY 'your_password'; mysql> FLUSH PRIVILEGES;
-
Open http://your-host-name and following the steps to install Drupal.