0

We have about 12000 users who doesn't have any roles. we need to change them to "contributor". How can I change them to "contributor"? Should I do on database? if so, which fields I need to update?

I try this code :-

INSERT IGNORE INTO an_usermeta (user_id, meta_key, meta_value)
SELECT DISTINCT
u.ID, 'wp_capabilities', 'a:1:{s:11:"contributor";b:1;}'
FROM an_users u

But when go to wp-admin i don't see any user for contributor role Thanks,

2

1 Answer 1

0

Manually change 1 user to a contributor then view their wp_capabilities entry in wp_usermeta table.

Update the rest of the table to set wp_capabilities to this value for the 12,000 users.

Not the answer you're looking for? Browse other questions tagged or ask your own question.