I use Valet as my local web development environment (PHP, Laravel, Wordpress, ...)
This gist is my own recipe to install Wordpress from the command line to use it with Valet. Maybe this is useful for you too.
If you don't have installed 'WP-CLI' tool yet, it can be done (in macOS) with:
$ brew install wp-cli
First we must to create a new project folder, download Wordpress and uncompress it... with this single command:
$ wp core download --path=MyWordpress
Now we can cding into our MyWordpress
new folder and we can see all the Wordpress stuff right here!
$ cd MyWordpress
$ ls
index.php wp-admin wp-config.php wp-links-opml.php wp-settings.php
license.txt wp-blog-header.php wp-content wp-load.php wp-signup.php
readme.html wp-comments-post.php wp-cron.php wp-login.php wp-trackback.php
wp-activate.php wp-config-sample.php wp-includes wp-mail.php xmlrpc.php
It's time to setup our database info. As I said above, I'm using Valet, so I setup my user as root
and no password:
$ wp core config --dbname=mywordpress --dbuser=root
Next we will create the database:
$ wp db create
And finally we will make the 'famous five minutes Wordpress install' using:
$ wp core install --url=http://mywordpress.app --title="My Wordpress Site" --admin_user=superadmin --admin_password=supersecret [email protected] --skip-email
That is!
$ wp plugin install woocommerce
Thanks for this! I had to change the following to get it to work with the latest Valet