WP-CLI Commands

Control BuddyActivity from the command line for server automation, cron jobs, and scripting.

BuddyActivity includes a set of WP-CLI commands for server-side control. WP-CLI is especially useful for running syncs via server cron on a precise schedule, bypassing the limitations of WP-Cron on low-traffic sites.

Info: WP-CLI must be installed on your server. Most managed WordPress hosts (WP Engine, Kinsta, Flywheel, etc.) include WP-CLI by default. Contact your host if you are unsure.

Available Commands

CommandDescription
wp buddyactivity syncRun a full sync immediately — reads the sheet and processes all pending rows.
wp buddyactivity sync --dry-runPreview which rows would be processed without actually creating any activities.
wp buddyactivity statusDisplay the current sync status — last run time, rows pending, rows processed.
wp buddyactivity reset-positionReset the sheet position pointer to row 2 (first data row).
wp buddyactivity clear-logsDelete all sync log entries from the database.
wp buddyactivity clear-queueRemove all completed jobs from the jobs queue. Does not affect pending or processing jobs.

Running Sync via Server Cron

To run BuddyActivity sync every 15 minutes using a server-level cron job, add the following to your crontab (via crontab -e or your hosting control panel):

bash
*/15 * * * * cd /var/www/html && wp buddyactivity sync --path=/var/www/html --quiet

Replace /var/www/html with the actual path to your WordPress installation.

Tip: Using --quiet suppresses output to keep cron emails clean. Remove it during testing to see the full output.

Using --dry-run

The --dry-run flag lets you preview what a sync will do without making any changes. This is useful when:

  • You have added a large batch of rows and want to verify everything looks correct before publishing.
  • You are debugging a sync issue and want to see which rows would be processed.
  • You want to confirm your sheet structure is valid before the first live sync.
bash
wp buddyactivity sync --dry-run

The output will list each row that would be processed, its type, user, and scheduled time — without creating any BuddyBoss activities.

Was this article helpful?

Menu