0

Wordpress: I need to bulk change user roles in the database using the "user id". Something like:

"Find users with id: 2827, 772, 234, 983, 14999 and set their rol to "custumer"

I know that the roles are saved in the table "wp_usermeta" in the fields "meta_key=wp_capabilities" and "meta_value=a:1:{s:6:"editor";b:1;}".

But I don't know how to create the slq query to search and replace them to change their values.See capture attached.

enter image description here

JPashs
  • 13,044
  • 10
  • 42
  • 65

1 Answers1

0

Easiest for me is to use phpmyadmin and edit one record. The response will give you the proper sql statement. Then run that for the other ids