WP-CLI Commands Reference
WP-CLI is a command-line interface for WordPress. These commands let administrators manage the site without using the web interface.
Running Commands
All commands are run from the scripts directory:
cd /home/nonstop/scripts/antiochians.org ./wp-cli-php83.sh COMMAND
User Management
# List all alumni ./wp-cli-php83.sh user list --role=um_alumni # Get user count ./wp-cli-php83.sh user list --role=um_alumni --format=count # Get specific user info ./wp-cli-php83.sh user get USER_EMAIL --format=json # Update user meta ./wp-cli-php83.sh user meta update USER_ID META_KEY META_VALUE
MailerPress Sync
# View all lists ./wp-cli-php83.sh um-mailerpress lists # Sync all alumni to MailerPress ./wp-cli-php83.sh um-mailerpress sync # Sync specific user ./wp-cli-php83.sh um-mailerpress sync-user USER_EMAIL # View sync stats ./wp-cli-php83.sh um-mailerpress stats
Alumni Maps / Geocoding
# View geocoding stats ./wp-cli-php83.sh um-maps stats # Geocode all users ./wp-cli-php83.sh um-maps geocode-all # Geocode specific user ./wp-cli-php83.sh um-maps geocode-user USER_EMAIL # Find alumni near a location ./wp-cli-php83.sh um-maps find-nearby "Washington DC" 50
Affiliate Groups
# List all groups ./wp-cli-php83.sh affiliate-groups list # List members of a group ./wp-cli-php83.sh affiliate-groups members GROUP_SLUG # Add member to group ./wp-cli-php83.sh affiliate-groups add-member GROUP_SLUG USER_EMAIL # Remove member from group ./wp-cli-php83.sh affiliate-groups remove-member GROUP_SLUG USER_EMAIL # Create a new group ./wp-cli-php83.sh affiliate-groups create SLUG "Name" --type=interest
Obituary / Memorial Management
# List all deceased alumni ./wp-cli-php83.sh um-obituary list # Mark user as deceased ./wp-cli-php83.sh um-obituary mark-deceased USER_EMAIL --death-date=2025-01-15 # Get memorial list ./wp-cli-php83.sh um-obituary memorial --start=2025-01-01 --end=2025-12-31
Account Merge
# Check if user has matching placeholder ./wp-cli-php83.sh antiochians-merge check-user USER_EMAIL # Find all potential merges ./wp-cli-php83.sh antiochians-merge find-matches
Database / Maintenance
# Export database ./wp-cli-php83.sh db export backup.sql # Run cron manually ./wp-cli-php83.sh cron event run --due-now # Clear transients ./wp-cli-php83.sh transient delete --all # Check Action Scheduler ./wp-cli-php83.sh action-scheduler status
Getting Help
# Get help for any command ./wp-cli-php83.sh help COMMAND # Example ./wp-cli-php83.sh help um-mailerpress