Quickly install and configure macOS 10.12+ for local WordPress development with WP-Brew, built for Mac minimalists. Inspired by ValetPress, rewritten to suit very opinionated needs.
WP-Brew uses Laravel Valet and WP-CLI to speed up the creation of a WordPress install on your local system. WP-Brew configures your Mac to always run Nginx in the background when your machine starts and with the help of Dnsmasq, all requests on the *.test
TLD are proxied to point to sites installed on your local machine which run the latest version of PHP via PHP-FPM, backed by MariaDB, encrypted with TLS using HTTP/2.
Because, sometimes, running a full virtual machine is simply overkill. No Vagrant. No Apache. No fuss.
- Download, install and activate a fresh WordPress site in a few seconds
- Run WordPress on your Mac using as little as 7MB of RAM
- Modern web stack: Nginx, PHP 7.x, MariaDB, Dnsmasq, WP-CLI, Composer
- Clone this repo into a directory such as
~/Resources/WP-Brew
(soon to become a Composer-installed package) - Install Homebrew and run
brew bundle
from within~/Resources/WP-Brew
; the included Brewfile will properly install everything needed by Valet, plus additional tools and dependencies (soon to be automated via bootstrap.sh/Makefile) - Setup Laravel Valet; all that should be needed is to run
composer global require laravel/valet
and to add~/.composer/vendor/bin
to your$PATH
(soon to be automated) - Symlink
~/Resources/WP-Brew/bin/wpb
somewhere like/usr/local/bin/wpb
(i.e. somewhere in your$PATH
) (soon to be automated) - Duplicate
~/Resources/WP-Brew/config.sample.json
to~/Resources/WP-Brew/config.json
and adjust as needed - Install and activate the WP-Brew DevTool WordPress plugin for additional development functionality (not to be used as a stand-alone plugin in a production environment!)
wpb create
- Download WordPress into a directory as specified in the config.json
- Setup the database and configure the install
- Create the user and password specified in config.json
wpb delete
- Lists available WP-Brew installations
- Confim deletion of project — database, files and all — prior to execution
wpb help
- Will display a summary of available commands
wpb park
- Register a directory as a path containing sites
wpb link
- Serve a single site from a directory
wpb unlink
- Destroy the symbolic link to a directory containing a site
wpb links
- See a listing of all linked directories/sites
wpb share
- Create a publicly-accessible URL of your local site using ngrok
wpb forget
- Remove a site from the "parked" directory list
wpb paths
- View all of your "parked" paths
wpb restart
- Restart the Valet daemon
wpb start
- Start the Valet daemon
wpb stop
- Stop the Valet daemon
wpb uninstall
- Uninstall the Valet daemon entirely
wpb secure
- Secure WordPress with SSL (encrypted TLS using HTTP/2 provided by mkcert)
wpb unsecure
- Destroy an SSL certificate and update https to http
wp_admin_email
is used as the admin email address for new WP installs.wp_admin_user
is used as the username for new WP installs. If changed you must update the username in the auto-login pluginwp_admin_password
is used as the password for new WP installs. If changed you must update the password in the auto-login pluginsites_folder
is a directory that you've runvalet park
in to serve sites.open_browser
if set to1
a browser will auto open after the install completes,0
will make so that it doesn'tbrowser
you can set the default browser such as Safari, or Google Chrome, etcvalet_domain
Default is set totest
but you can change this to whatever you use for Valet, this can be adjusted by usingvalet domain TLDTOUSE
plugins_add
Plugins that you wish to install/activate on each new installplugins_remove
Plugins that you wish to remove from the default installs