⚡ Manage WordPress from Terminal
Clicking through admin for every site update? Slow. WP-CLI lets you install plugins, update core, manage users—all from command line. 10x faster.
Install WP-CLI
# Download curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar # Make executable chmod +x wp-cli.phar # Move to PATH sudo mv wp-cli.phar /usr/local/bin/wp # Test wp --info
🚀 Essential Commands
# Update WordPress core wp core update # Install plugin wp plugin install contact-form-7 --activate # Update all plugins wp plugin update --all # Create user wp user create john john@example.com --role=editor # Search & replace in database wp search-replace 'http://oldsite.com' 'https://newsite.com' # Export database wp db export backup.sql # Clear cache wp cache flush
✅ Power User Commands
- wp post list: List all posts with filters
- wp media regenerate: Regenerate all image sizes
- wp user list: Show all users with roles
- wp option get siteurl: Get any option value
- wp transient delete –all: Clear all transients
“Manage 30 client sites. Before WP-CLI: 2 hours to update everything. After: Created bash script with WP-CLI. 10 minutes, all sites updated, backed up, tested. Game changer.”
