How to migrate wordpress users from one blog to another

Normally BackupBuddy should transfer users just fine, it might be issue with importing into multisite installation. Have you tried asking developers about it? As for more hands-on approach I’d try creating users in network and then overwrite hashes of their passwords in database with values from original installation.

Is it possible to fix/repair all Index, Primary Key, Unique (and all other) structure of a WordPress MS Database

Yes the issue is due to the auto increment setting. All WordPress DB specifics can be found here, which includes details on which ones use auto increment: https://codex.wordpress.org/Database_Description This isn’t going to be an easy task, but here’s some sites to help you: https://www.photographerstechsupport.com/tutorials/fixing-wordpress-indexes-foreign-keys-and-auto_increment-fields/ This one is specific to wp_options: https://guides.wp-bullet.com/fixing-wp_options-table-missing-unique-column-primary-key/ Specifically the auto increment: … Read more

Only allow plugin to be activated on root site of multisite

You could check if the constant SITE_ID_CURRENT_SITE matches get_current_site()->id. The following does this for the activation. During runtime you have to check it again. register_activation_hook( __FILE__, ‘force_main_site_installation’ ); function force_main_site_installation() { if ( defined( ‘SITE_ID_CURRENT_SITE’ ) and SITE_ID_CURRENT_SITE !== get_current_site()->id ) { if ( function_exists(‘deactivate_plugins’) ) { deactivate_plugins( __FILE__ ); } die( ‘Install this plugin … Read more

Multisite Installation: how do I setup global search?

I think the best way to do it is to index all the posts and search through them in database. This method should be the fastest when you perform a search because you can filter posts, create the pagination etc. Check this tutorial https://rudrastyh.com/wordpress/search-across-wp-multisite.html Another way is to to something with switch_to_blog() function – I … Read more

Restrict the user access in multi site for non-assigned blogs

is_user_logged_in() is a pluggable function, which means you can override its functionality. That’s probably where I’d start. Something like this may do what you’re looking for. This is untested code and comes with no warranties of any kind. function is_user_logged_in() { $user = wp_get_current_user(); $current_blog_id = get_current_blog_id(); $allowed = false; $blogs_of_user = get_blogs_of_user( $user->ID ); … Read more