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.

A quick preview of WP CLI - Chennai WordPress Meetup

93 views

Published on

Slides from my talk about using WP CLI that I gave in Chennai WordPress Meetup - March 2020

Published in: Software
  • Be the first to comment

  • Be the first to like this

A quick preview of WP CLI - Chennai WordPress Meetup

  1. 1. A quick preview of WP CLI Sudar Muthu @sudarmuthu
  2. 2. CLI interface for WordPress
  3. 3. Create Update Delete List • Posts • Users • Comments • Menus • Metas • Cron • Plugins • Themes
  4. 4. Chaining commands together wp post delete $(wp post list -- post_type='page' --format=ids) wp comment delete $(wp comment list --status=spam --format=ids)
  5. 5. Cool things you can do • Editing wp-config constants • WP Shell • Search Replace across all tables • Update WordPress itself • Clear Cache • Optimize DB Tables • Handle cron events • Regenerate thumbnails • Scaffold tests for plugin
  6. 6. Useful snippets Check Table size wp db size -–tables Reset User password wp user update admin@example.com --user_pass=pass Generate quick dummy content wp post generate --count=10 Generate code to register a custom taxonomy wp scaffold taxonomy venue --theme="twentytwenty"
  7. 7. Running commands on remote servers Set alias for ssh config and commands can be run over SSH wp @sm post list wp @sm plugin list
  8. 8. Thank You @sudarmuthu

×