Skip to content

Instantly share code, notes, and snippets.

@ljungmark
Created March 25, 2018 21:44
Show Gist options
  • Save ljungmark/8358392bac2bfa11161233a8e0062ca4 to your computer and use it in GitHub Desktop.
Save ljungmark/8358392bac2bfa11161233a8e0062ca4 to your computer and use it in GitHub Desktop.
Upgrade PHP version on Mac
# 1. Check where your current PHP is located
> $ which php
# ...which will result in smoething like this
> $ /usr/local/bin/php
# 2. Unlink the current link of PHP
> $ unlink /usr/local/bin/php
# 3. Install PHP
# Change the PHP version on the end
> $ curl -s http://php-osx.liip.ch/install.sh | bash -s 7.1
# 4. Create new link
# Change the PHP version based on the version you just installed
> $ ln /usr/local/php5-7.1.9-20170914-100859/bin/php /usr/local/bin/php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment