Laravel’s Valet tool makes spinning up a local development environment quick and painless for OS X users. Valet uses the Caddy web server, PHP 7, along with MariaDB. It can be installed in just a few minutes with Homebrew and Composer.
Valet or Trellis
We recommend using Trellis to have dev/prod parity, but sometimes you need something quick and fast for testing or a demonstration. Instead of having to wait for a
vagrant up to finish, Valet sites are immediately available once configured.
Valet is also compatible with Craft CMS, Statamic, static HTML and other applications. It will quickly prove to be a useful tool to have running on your machine regardless of your primary development workflow.
Check to make sure that you don’t have any web servers already running on port 80, such as from MAMP or previously configured local Apache/Nginx servers. Also make sure that Valet’s dependencies have been installed before moving on:
Homebrew (Already installed? Run
Composer with your
export PATH="$PATH:$HOME/.composer/vendor/bin"to your profile (
Now open your Terminal and run the following commands:
# Install PHP 7.0 $ brew install homebrew/php/php70 # Install Valet $ composer global require laravel/valet # Install DnsMasq and configure Valet to launch on system start $ valet install # Install MariaDB $ brew install mariadb
Setting up Bedrock sites
Create a Valet directory for your Bedrock sites (since my Trellis installs and other projects typically live in
~/Sites, I’m using a subdirectory) and link it:
$ mkdir ~/Sites/valet $ cd ~/Sites/valet $ valet park
Any subfolders you create from
~/Sites/valet are now sites that are served from
$ wp package install aaemnnosttv/wp-cli-valet-command:^1.0 $ wp valet new my-project --project=bedrock
You can now access your new development site at
The Valet docs explain the tool in more detail, including how to use
valet share to share your local sites with anyone in the world.
Valet also supports vanilla WordPress installations, although typically you’d never want to use a regular WordPress installation over Bedrock.