Omg wp cli

Omg wp cli

Omg wp cli

If you have lots of sites to maintain then wp cli is the tool. I am using putty to connect.

Recipes so far ( my wp command is wp-cli )

aliases!

.bashrc

# Check themes, core, plugins for updates 
alias check-all='wp-cli core check-update && wp-cli plugin list --update=available && wp-cli theme list --update=available'

# Update all that it can be updated
alias update-all='wp-cli core update && wp-cli plugin update --all && wp-cli theme update --all'

Woocommerce install sample data

wp-cli plugin install wordpress-importer && wp-cli plugin activate wordpress-importer

crap this does not work 100%, it imports images, products but not variations/attributes, you still have to use the woo importer.

wp-cli import wp-content/plugins/woocommerce/sample-data/sample_products.xml –authors=create