- Install Homebrew or update to the latest version using
brew update
.
If you're upgrading van Valet+ 2.3 or lower use the extra following steps.
- Remove all
valet-php@
versions withbrew remove valet-php@...
.- You might end up with some broken links, you can use
brew doctor
to find and remove/resolve them.- Untap henkrehorst/php with
brew untap henkrehorst/php
.
- Add the Homebrew PHP tap with
brew tap shivammathur/php
. - Install PHP 7.4 using homebrew with
brew install shivammathur/php/[email protected]
. - Link the installed PHP version using
brew link [email protected] --force --overwrite
.
Sometimes you need to restart your terminal for the link to have effect.
- Install Composer using anyway you like, suggested is using
brew install composer
. - Install Valet+ with Composer using
composer global require weprovide/valet-plus --update-with-dependencies
. - Add
export PATH="$PATH:$HOME/.composer/vendor/bin"
to.bash_profile
(for bash) or.zshrc
(for zsh) depending on your shell (echo $SHELL
). - Run the
valet install
command. Optionally add--with-mariadb
to use MariaDB instead of MySQL This will configure and install Valet+ and DnsMasq, and register Valet's daemon to launch when your system starts.
Sometimes
php
(latest version) gets installed too, which throws an "Unable to determine linked PHP" error. In this case just re-link PHP 7.4.
After install you can validate that it's working by pinging any
.test
domain you like, for exampleping -c1 foobar.test
.
Sometimes you to need restart your Mac in order for all installed services to work properly.
- Create any directory on your disk to your liking where you run your sites from and park valet there with
valet park
. - Restart Valet+ if necessary with
valet restart
.