We have about 8000 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?


  • Have you don't set any role for them? Please show us the entry from a user without any role and his usermeta value for wp_capabilities. – kaiser Aug 26 '13 at 13:42

You can do it by executing simple SQL query:

UPDATE wp_usermeta
   SET meta_value = 'a:1:{s:11:"contributor";b:1;}' 
 WHERE meta_key = 'wp_capabilities' 
   AND meta_value = 'a:1:{s:10:"subscriber";b:1;}'

This query will updated all subscribers to be contributors.

  • thanks for your answer. but some users don't have any roles. their's roles are "None". then how I need to update? – pulla Aug 26 '13 at 15:12
  • Find out what wp_capabilities meta contains for these users. – Eugene Manuilov Aug 26 '13 at 15:24
  • there is no wp_capbilities for some users. i can't find them on user-meta – pulla Aug 26 '13 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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