How to carry over existing wp users to a new buddypress installation

I had made a community with a different plugin (I think it was mingle.
I recently installed buddypress, removed mingle and changed the site to suite. Now the problem is the existing users are not listed as members in the members page, only me, the admin. I have looked for, but not found, a solution. i am know how to use WordPress but this one has stumped me. This may be an easy question for all those experienced buddypress users out there, but I am just starting, so keep that in mind before you say how completely dumb I am 🙂

Thanks for taking the time to read this.

Related posts

Leave a Reply

1 comment

  1. The following plugin will make all WordPress users to appear on BuddyPress members directory. It doesn’t provide full migration of users, but it will update the last_activity user meta field that is used by BP to display users.

    This is a plugin code, so you need to create a new php file (eg. bp-add-users.php) and upload it to plugins directory of your WP installation wp-content/plugins. When you activate the plugin it will update all users, after that you can deactivate and delete:

    /*
    Plugin Name:  BP User Updater
    Description:  Update `last_activity` user meta for all users.
    Author:       Ahmad M
     */
    
    register_activation_hook(__FILE__, 'add_users_to_bp');
    
    function add_users_to_bp() {
    
        $users = get_users();
    
        foreach ($users as $user) {
            update_user_meta($user->ID, 'last_activity', date("Y-m-d H:i:s"));
        }
    }