WPTavern: Laravel Releases Valet, a Minimalist Development Environment with Support for WordPress

Should you republish old content?
May 6, 2016
WPTavern: WordPress 4.5.2 Patches Two Security Vulnerabilities
May 6, 2016
Show all

photo credit: Valet Parking, Las Vegas, NV - (license)photo credit: Valet Parking, Las Vegas, NV(license)

Laravel, the open source MVC PHP framework created for application development, has just released Valet, a minimalist development environment for Mac. It uses just 7mb of RAM, because it doesn’t include Vagrant, Apache, Nginx, or a /etc/hosts file. Here’s how it works:

Laravel Valet configures your Mac to always run PHP’s built-in web server 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.

Valet supports Laravel, Lumen, Statamic, Craft, Jigsaw, and even has a driver for WordPress. It’s handy if you just need a simple, fast development environment without virtualization. Developers can also share sites publicly via local tunnels. It’s as easy as navigating to the site’s directory in the terminal and running the valet share command, which generates a publicly accessible URL.

WP Pusher founder Peter Suhm, who is active in both the Laravel and WordPress communities, wrote a tutorial for setting up Valet for WordPress development.

“For larger apps, I generally prefer my development environment to be very similar to production,” Suhm said. “Vagrant and Docker are great for that. Valet is great for all those quick and dirty WordPress installations you need, just to test something or quickly work on an idea. If you don’t need anything else besides PHP 7 and a database, Valet is a great setup.”

Since it doesn’t require a ton of dependencies, Valet is quick to set up and doesn’t require any configuration. Developers don’t even need to make Valet aware that their app is WordPress – you can simply drop WordPress core files into a folder on your machine and then access the site in your browser.

If you’re looking for a new lightweight development environment or just a quick way to do some PHP 7 testing for WordPress plugins, Valet may fit nicely into your workflow. You can install it using Homebrew. View the docs for installation and site setup or follow along with Suhm’s tutorial.

To see a quick demo of Valet in action, check out the two-minute introduction video created by Adam Wathan:

View @ Planet WP

Skip to toolbar