Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

WooCommerce WP-CLI Basics

1,486 views

Published on

Quick explanation on how to use WP-CLI with WooCommerce 2.5+. Talk given at Bucharest WordPress meetup on April 20th 2016.

Published in: Business
  • Be the first to comment

WooCommerce WP-CLI Basics

  1. 1. WP-CLI FOR WooCmmerce
  2. 2. Rémi CORSONNinjineer @ Automattic remicorson.com @remicorson
  3. 3. WHAT'S WP-CLI?
  4. 4. "WP-CLI is a set of command-line tools for managing WordPress installations" — wp-cli.org
  5. 5. BASED ON THE TERMINAL
  6. 6. WP-CLI CAN BE ▸ installed locally or your server ▸ run on SSH ▸ used on Windows, Mac OSX, Linux ▸ used for WP core features ▸ used for plugins/themes features
  7. 7. DEMO
  8. 8. REQUIREMENTS ▸ WordPress 3.7 or later ▸ PHP 5.3.2 or later ▸ WooCommerce 2.5 or later ▸ UNIX-like environment (OS X, Linux, FreeBSD, Cygwin)
  9. 9. WP-CLI INSTALLATION
  10. 10. FIRST, DOWNLOAD WP-CLI.PHAR USING WGET OR CURL curl -O https://raw.githubusercontent.com/ wp-cli/builds/gh-pages/phar/wp-cli.phar
  11. 11. THEN, CHECK IF IT WORKS php wp-cli.phar --info
  12. 12. TO BE ABLE TO TYPE JUST WP, INSTEAD OF PHP WP-CLI.PHAR, YOU NEED TO MAKE THE FILE EXECUTABLE AND MOVE IT TO SOMEWHERE IN YOUR PATH. chmod +x wp-cli.phar sudo mv wp-cli.phar /usr/local/bin/wp
  13. 13. NOW YOU CAN RUN wp --info
  14. 14. HOSTS Some hosts have WP-CLI already installed: ▸ Bluehost ▸ Dreamhost ▸ Synthesis ▸ SiteGround
  15. 15. WP-CLI USE
  16. 16. MAIN COMMAND FORMAT wp <command> <sub-command> <params>
  17. 17. PARAMETERS FORMAT --paramnam --paramname=value
  18. 18. EXAMPLES
  19. 19. wp plugin deactivate –all wp plugin activate woocommerce
  20. 20. wp core download wp core config --dbname=test --dbuser=test wp core install --prompt
  21. 21. WP-CLI + WOOCOMMERCE
  22. 22. wp wc <command> <sub-command> <params>
  23. 23. GET HELP
  24. 24. wp wc --help
  25. 25. wp wc product --help
  26. 26. wp wc product create --help
  27. 27. EXAMPLES
  28. 28. wp wc product create --title="Product Name"
  29. 29. wp wc order list
  30. 30. GOING FURTHER
  31. 31. THANKS!

×