Skip to content

Instantly share code, notes, and snippets.

@mavisland
Created September 22, 2017 04:57
Show Gist options
  • Save mavisland/e8073823f3c3620387eaa01a316d9bb5 to your computer and use it in GitHub Desktop.
Save mavisland/e8073823f3c3620387eaa01a316d9bb5 to your computer and use it in GitHub Desktop.
$ cd ~/Sites/wordpress/ to get you in your working folder
$ wp core download - Downloads the latest wp to that folder
$ wp core config --dbname="wp-experiment" --dbuser="whatevs" --dbpass="shhh" --dbhost="127.0.0.1" --skip-check - creates your wp-config.php file for you.
$ wp db create - creates the db for you using the deets you entered into your wp-config.php file.
$ wp core install --url=example.com --title=Example --admin_user=supervisor --admin_password=strongpassword --admin_email=info@example.com - does the wp install in seconds.
You now have a running wordpress site! The cooler thing about the wp cli is that your average maintenance becomes a lot quicker.
$ wp core update - updates your wordpress installation
$ wp plugin update - updates all your plugins
$ wp plugin install bbpress --activate - install & activate a plugin
There is obvs a whole lot more it can do, especially around migrating content/db between servers etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment