Thank you to Melissa Jean Clark for snapping a few pictures during my talk.
On Sunday, I had the honour of getting to speak at WordCamp Toronto, a 2 day conference full of developers, designers, and users of the WordPress platform. It was my first time giving this talk about the WP-CLI library, and I couldn’t have asked for a better audience. My “talk” turned into more a group discussion.
The video of the talk will be online at some point, but in the meantime, you can see the slides here:
I also wanted to share chunk of code that I used during the talk. It’s my script to create a new WordPress installation from the command line, assuming you have permissions in MySQL to CREATE DATABASE. I only recommend doing this in a development environment.
#!/bin/bash wp core download wp core config --dbuser=root --dbname=$1 --dbpass=vagrant wp db create wp core install --admin_user=wcto --admin_password=wcto --admin_email[email protected] --title="WordCamp Toronto" --url=http://localhost/$1/
Running this script, for example:
./newsite demosite
from the command line will:
- Download the WordPress core
- Create a wp-config.php file
- Create a database using the connection details specified in step 2.
- Go the “5 minute” install of WordPress – in seconds.
Once this runs, you can login to your dashboard, you’re ready to go.