I created a checkbox option for the user_meta (user profile). They are checkboxes assigning users to categories.

The problem is that I need to do a mass update for all of my users 1500+ and going through them individually would take too long.

I need to choose the intended categories for each user. There are 180 categories.

This is a screen shot of the section of the user profile that I want to update:

enter image description here

I need a way of doing this. Im open to using a custom script (preferably not a plugin), csv import, or any other options.

The purpose of the category selections is so that I can save their descriptions in a meta field that will then be searchable with a custom query. This won't work if the users dont have a category(ies) selected. It's a pain now because there is a large amount that I need to do at once, but ideally the categories will be selected as new users are created.

Anyone with a way of achieving this please help. Please let me know if there is any additional info needed.

Thanks a lot

1 Answer 1


update_user_meta() is what should assist you in doing this. Feed what get_users() returns and update the meta data for each and every one of them with the required values.

Assuming that you are going to store a serialized array, your custom query will have to unserialize each result in order to perform a search. I may not know the full extent of your intentions, but I hope this helps.

  • Thank you Soulseekah. Yes, I think you advice will help me. I found this question/answer (wordpress.stackexchange.com/questions/13353/…) that relates to what you mentioned. I basically need to update array selections for each user. Thanks for your feedback!
    – user1893
    Oct 21, 2011 at 15:16
  • Glad to have been of some guidance.
    – soulseekah
    Oct 22, 2011 at 5:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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