Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MacOS delete php 5.6 and leave only php 7

Tags:

php

unix

macos

I have 2 versions of php installed on my macOS. When I restart the computer it is set by default to php 5.6 (I have already twice installed php 7 and it is available only till the next restart). How can I set the default to be 7.0? what should I do in .bash_profile? (to what should I change the home path of the php variable?)

like image 374
Andrew T Avatar asked Oct 29 '22 09:10

Andrew T


1 Answers

If you install PHP with Homebrew, you might need to unlink the 5.6 version. Like:

$ brew unlink php56 

Then you may start to install PHP 7.2

You can get more information from my article:

Upgrade PHP version from 5.6 to 7.2 on macOS Sierra (10.12)

like image 90
Charles Hsu Avatar answered Nov 15 '22 06:11

Charles Hsu