Skip to content

Manual Processing - Backfill Existing Members

The auto-friendship rules fire automatically on new signups and role/type changes. Manual processing is the one-time sweep that retroactively connects every existing member to the ambassador pool you have configured.

Use it right after installing the plugin on an established site, after a bulk role import, or any time you have changed which roles or member types act as ambassadors.

Processing card on Overview tab

  • Right after activation on a site that already has members.
  • After a CSV import that bulk-assigned roles or member types.
  • After adding or removing a role from the Auto-Friendship tab and wanting existing members to catch up.

You usually only need to do this once per rule change. Dynamic processing handles future signups and role changes automatically from then on.

  1. Go to WB Plugins → Auto Friends → Overview.
  2. Click Welcome existing members now. The button appears under whichever mode you configured (roles or member types).
  3. A live progress bar appears showing total users, processed count, and friendships created.

The job runs in the background via WordPress cron. You can safely navigate away - processing continues. Return to the Overview tab to check the updated progress and final count.

  • The job runs bautof_create_existing_friendships() via the bautof_create_existing_user_friendships_event cron.
  • The initiator pool is every active member on the site. The ambassador pool is every member holding one of the configured roles or member types, plus any hand-picked Global Friends.
  • Every initiator is friended with every ambassador, the same one-way, role-agnostic model new signups go through.
  • Members are processed in batches of 100 users (configurable via the bautof_friendship_batch_size filter) with memory checks at 85% of the PHP memory limit.
  • Each pair is created via bautof_force_friendship() and the per-pair _bautof_auto_created_friends meta is set on both sides so cleanup can later identify these as plugin-created.
  • Friendship notification hooks are removed before the sweep and restored after it.
Transient TTL What it guards
bautof_sync_running 30 min Prevents concurrent syncs
bautof_sync_start_time 2 hr Tracks when the run started so a stuck job can be cleaned up

If a sync gets stuck, use the emergency stop described in Troubleshooting Common Issues.

On installs with many thousands of members, the sweep can run for several minutes. Leave the page open - the progress polling does not re-issue the job. If you close the tab, the cron keeps running in the background; return to the Overview tab later to see updated counts.

For installs with 50,000+ members, run the sweep during a quiet hour. Friendship notification emails are always suppressed for plugin-created friendships.