Start by installing homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Next, use the following commands
brew installs email@example.com brew link --force firstname.lastname@example.org brew services start email@example.com export PATH"/firstname.lastname@example.org/bin:$PATH" export PATH"/email@example.com/sbin:$PATH"
Once this is done, check that the php version is correct
php -v PHP 7.4.13 (cli) (built: Nov 30 2020 14:46:04) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies