The danger there is that you may make yourself a subscriber too!
In the wp_usermeta table, you want to find their wp_capabilities and make it a:1:{s:10:"subscriber";s:1:"1";}
Yes but I can change the admin account back to
a:1:{s:13:”administrator”;s:1:”1″;}
I just need to change all the users to subscribers. I’m looking for a complete query for mysql that I can run because i have 2000 members and that’s a lot to change manually.
Right, it’s a search wp_usermeta for the meta_key of wp_capabilites and replace the value. 🙂
Also known as ‘I don’t know the query off the top of my head, but since you seem copacetic with SQL, you probably know how it works in general, so you can figure it out from here.’
Well, I don’t see a replace function in phpmyadmin so here I am looking for the query. I have noticed that the roles that say “None” in the admin area have NO entry for wp_capabilities so I assume that I need to insert the a:1:{s:10:”subscriber”;s:1:”1″;} into it but damn if I know how to do it in one full sweep.
Untested…
UPDATE wp_usermeta SET meta_value = '{s:10:"subscriber";s:1:"1";}' WHERE meta_key = 'wp_capabilities';
So what we’re saying here is ‘Set the Meta VALUE to Subscriber where the KEY is ‘capabilities’. 🙂
I will surely test this now and let you know… Thank you for that. More to come.
Well, the command ran and set all the wp_capabilities to the subscribers but when I view the Role in the WP Admin Users area it says “None”. Any suggestions?
Try using ‘a:1:{s:10:”subscriber”;s:1:”1″;}’ instead in Ipstenu’s code