

Running the above command will download the composer.phar in the current directory.
Mamp setup install#
This will install composer using MAMP's PHPĪs you can see, that instead of the standard php at the end, we have used phpmamp, which is an alias for the PHP installation of MAMP.

With that set, now it's time to install composer.įirst, run the following command in your terminal. Once you have done this, please open a new shell window for the changes to be picked up by the terminal. As the installed version of php in MAMP on my laptop is 7.4.33, hence the directory name is php7.4.33, but you can check your PHP version.
Mamp setup update#
Update the above command as per your PHP version. zprofile file and add an alias for the PHP installed by MAMP.Īnd add the following line to this file, # alias for MAMP PHP installation for composerĪlias phpmamp='/Applications/MAMP/bin/php/php7.4.33/bin/php' We are using nano, you can use vim if you want:įor new versions of macOSX, bash profile is now changed to zsh, so you will have to update the. Open your terminal, and run the below command to open profile. For this we first need to create an alias for MAMP's PHP installation, for this, we will add the code for making a new alias in our bash profile. Now as PHP is installed within MAMP, we would want that Composer should use PHP installation that was done along with MAMP. Install Composer globally using MAMP's PHP installation These days almost all the libraries are using composer. It downloads all the dependency that any project has on external libraries. Click on Start Server to start the Apache Web server and MySQL database server.Ĭomposer is a Dependency Manager for your project. Now go to your applications and double click on MAMP icon to start it.
Mamp setup pro#
The installation process is pretty straightforward, with just one catch, MAMP Pro is also installed along with the MAMP free version, which you can, of course, uninstall later. Once the setup file is downloaded, click on it to start the installation. All you have to do is download the latest setup from MAMP's Official Website. I would suggest installing MAMP for macOS as it is more compatible with it and has a better user interface, which is a must for beginners. The most popular, cross-operating system software package is XAMPP, which is widely used for PHP development locally for Windows OS, but personally, it is not that good when it comes to the macOS. To do so, either you can install everything manually or you can install ready-made software packages, which comes packed with all the requirements for PHP development environment. As we know that the to setup development environment for PHP, you need a PHP parser, a Web Server and a database like MySQL or Oracle if you want to work on a dynamic website.
