Posts | About

Update Laravel Valet After PHP Upgrade

April 3, 2020 by Areg Sarkissian

Use Homebrew MacOS package manager to upgrade the default php version to the latest php version.

First update homebrew to latest version

brew update

Then upgrade PHP to the latest version

brew upgrade php

Source the bash profile to make sure path to latest PHP version is set

source ~/.profile

Next update composer

composer global update

Now update valet by installing it again

valet install

Finally tell valet to use the latest upgraded php

valet use php

Now we can go into the directory that hosts our Laravel project directories and run valet park to re-register our sites and we can verify that the ~/.config/valet/config.json file lists the directory that hosts the Laravel projects.

Link projects:

valet park

List all linked projects:

valet links

Latest Valet docs can be found at