Create a host using the command line
You can create a host using the command by using the following steps
- Quit MAMP PRO.
- Open Terminal.app ( /Applications/Utilities ).
- Enter the following line into the terminal and hit enter:
/Applications/MAMP\ PRO/MAMP\ PRO.app/Contents/MacOS/MAMP\ PRO cmd createHost testHost /Applications/MAMP/htdocs2
- Enter the following line into the terminal and hit enter:
/Applications/MAMP\ PRO/MAMP\ PRO.app/Contents/MacOS/MAMP\ PRO cmd createHost testHost /Applications/MAMP/htdocs2 testDB
- Enter the following command and hit enter:
/Applications/MAMP\ PRO/MAMP\ PRO.app/Contents/MacOS/MAMP\ PRO cmd stopServers
This will create a host with the name ‘TestHost’, with a document root of ‘/Applications/MAMP/htdocs2’, and a database named ‘testDB’. MAMP PRO will briefly open both when the servers are started, stopped, as well as when the host is created. MAMP PRO will then quit again each time. When you re open MAMP PRO you will see your new host and database.