Last Updated: 29 Oct 2023
|
Upgrading MAMP Pro
Upgrading MAMP Pro can be a little complicated. Here's the procedure I used to upgrade from 3 to 4.1:
- If you've customized your
httpd.conf
,php.ini
, etc. make sure to make a backup copy. Easiest way to do this is to go toFile
→Edit Template…
and copy the contents of each file. Depending on which version you're upgrading from/to, MAMP may or may not preserve your custom edits. - Make sure MAMP isn't running.
- Download the new MAMP from https://www.mamp.info/en/downloads/
- Run the installer. It should automatically figure out that you need to upgrade, and do that for you.
- Load MAMP Pro and allow it to initialize its components.
- The new version of MAMP Pro may come with new templates for
httpd.conf
,my.cnf
, etc. It will ask you to save your existing ones somewhere else; do that and then usediff
(or FileMerge) to migrate any changes. If it doesn't, you may want to check the new versions against the backup copies you made earlier just to make sure everything is there. - NOTE: As of MAMP 4.X there is a new option 'Make this version of PHP available from the command line' which negates the need to do these manual linking steps. That said, if you want to manually link your PHP binaries from my
/usr/local/bin
to the MAMP equivalents (rm's are only needed if you've done this linking before):sudo rm /usr/local/bin/php sudo rm /usr/local/bin/phpize sudo rm /usr/local/bin/php-config sudo rm /usr/local/bin/pear sudo ln -s /Applications/MAMP/bin/php/php7.1.0/bin/php /usr/local/bin/php sudo ln -s /Applications/MAMP/bin/php/php7.1.0/bin/phpize /usr/local/bin/phpize sudo ln -s /Applications/MAMP/bin/php/php7.1.0/bin/bin/php-config /usr/local/bin/php-config sudo ln -s /Applications/MAMP/bin/php/php7.1.0/bin/bin/pear /usr/local/bin/pear
- MAMP very annoying uses a different php.ini if you call it on the command line vs. calling it via apache. So I typically link the command line over to reference the apache one:
sudo rm /Applications/MAMP/bin/php/php7.1.0/conf/php.ini sudo ln -s "/Library/Application Support/appsolute/MAMP PRO/conf/php.ini" "/Applications/MAMP/bin/php/php7.1.0/conf/php.ini"
- You'll probably want to link
mysql
as well:sudo rm /usr/local/bin/mysql sudo ln -s /Applications/MAMP/Library/bin/mysql /usr/local/bin/mysql
- You may need to reinstall phpunit or other software you've customized MAMP with.
- That should be it. Test your sites out and see if they work.
Discussion