Currently seeking new career opportunities in web development, particularly with Laravel, Hire Me

Installing php 7 on Mac

David Carr

Development Tutorials PHP & MySQL

Setting up a mac to run php 7 instead of the default php 5.5. 

First install Homebrew if it’s not already installed.

/usr/bin/ruby -e "$(curl -fsSL"

Then run these commands in terminal:

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install php70

Update the default php version terminal uses by opening your bash profile:

nano ~/.bash_profile

Set the PATH:

export PATH="/usr/local/sbin:$PATH"

Then press CTRL + x to save and exit.

Restart terminal and enter php -v to see the php version in use.


Laravel Modules Your Logo Your Logo Your Logo

Become a sponsor

Help support the blog so that I can continue creating new content!


My Latest Book

Modular Laravel Book - Laravel: The Modular way

Learn how to build modular applications with Laravel Find out more

Subscribe to my newsletter

Subscribe and get my books and product announcements.

Learn Laravel with Laracasts

Faster Laravel Hosting

© 2006 - 2024 DC Blog. All code MIT license. All rights reserved.