Create a WordPress and WooCommerce development environment with the help of Valet.
- Install or update Homebrew
- Run the following commands
brew tap woocommerce/woovalet [email protected]:rrennick/woovalet.git
brew install woocommerce/woovalet/woovalet
For now, WooCommerce Valet has just one command: woovalet
.
The woovalet
command will:
- ask for the name of your project, enter something like
myproject
, defaults towoocommerce
- ask for your MySQL/MariaDB root password (if you haven't set a password leave this blank)
- download WordPress into the directory
~/Sites/myproject
- setup the database called
myproject
& configure the WordPress installation - create a new user with your MacOS username and password of
password
- remove the default WordPress plugins
- configure
myproject.localhost
to run using TLS/SSL - clone the WooCommerce git repository
- activate the WooCommerce plugin
- installs a number of plugins useful for development
- install and activate the Storefront theme
- install WooCommerce dummy data for test products
This script will change your Valet configuration to serve projects using .localhost
, a reserved top level domain for development, as the top level domain, instead of the default .dev
, which is not a reserved TLD.
The script also uses ~/Sites
as a Valet project directory, as per the Valet installation instructions.
WooCommerce Valet installs the development version of WooCommerce from its GitHub repository.
When new versions of WooCommerce are released, its recommended you update WooCommerce via Git from the command line, rather than the WordPress Plugins administration screen. Using the latter will overwrite the development version with the publicly released version which does not have the /tests/
directory necessary for running unit tests.