How To Install “Valet” And “wp valet” Command

06. February 2017 Note ,

Valet is a development environment for Laravel.

Valet is a Laravel development environment for Mac minimalists. No Vagrant, no /etc/hosts file. You can even share your sites publicly using local tunnels. Yeah, we like it too.

Laravel Valet configures your Mac to always run Nginx in the background when your machine starts. Then, using DnsMasq, Valet proxies all requests on the *.dev domain to point to sites installed on your local machine.

And it supports WordPress too.

How To Install Valet

It was easy. 🙂

Install following packages with Homebrew.

  • Nginx
  • Dnsmasq
  • PHP7 or later
  • MySQL

Install Valet with Composer.

$ composer global require laravel/valet

Then run following command.

$ valet install

WP-CLI Valet Command

@aaemnnosttv developed a wp valet command which is really useful to launch WordPress on Valet.

You can install it with following command.

$ wp package install aaemnnosttv/wp-cli-valet-command

Then you can launch WordPress like following.

$ wp valet new hello
Don't go anywhere, this should only take a second...
Success: hello ready!

Then you can visit

You can delete it with the following command when it becomes unnecessary

$ wp valet destroy hello

This command has many option, you can see them with help.

$wp help valet new


  wp valet new


  Create a new WordPress install -- fast


  wp valet new <name> [--project=<project>] [--in=<dir>] [--version=<version>]
  [--locale=<locale>] [--db=<db>] [--dbname=<dbname>] [--dbuser=<dbuser>]
  [--dbpass=<dbpass>] [--dbprefix=<dbprefix>] [--admin_user=<username>]
  [--admin_password=<password>] [--admin_email=<email>] [--unsecure] [--portable]


Leave a Reply

Your email address will not be published. Required fields are marked *