Add the PHP formulae brew tap php Choose the PHP version – this example uses 7.4 brew install php@7.4 Link the PHP Version brew link --overwrite --force php@7.4 Restart the Terminal php -v