Powered By Blogger

Thursday, February 27, 2020

How to find user assigned how many site in multisite wordpress


  1. select * from wp_blogs
From the output of the command note down the blog_id you want the users of. For eg: say you are wanting the users of the site with blog_id = 2 , next run the following query.
  1. select * from wp_users u join wp_usermeta um on u.id=um.user_id where um.meta_key="wp_2_capabilities"

REF : https://stackoverflow.com/questions/27495552/how-to-get-users-who-belong-to-a-wordpress-multisite-blog-site-with-sql

1 comment: