Subscribers become Authors after Upgrade? / Mass Update of Users?

Hi @Bee:

I have no idea why this happened. But if I understand your problem correctly you need to set these user records back to being 'subscriber' instead of 'author', right?

Normally I would not recommend direct SQL update like this but given the nature of the problem and it being a one-time thing I think it will be okay.

But first BACK UP YOUR DATABASE before you try any of this.

Here’s the SQL to run based on what I know of the internals of WordPress and also based on this support question (this assumes that the prefix for your main tables is 'wp' and also assumes you are okay to set all users assigned to with 'author' back to subscriber and manually make any corrections using the WordPress admin console.) So if you know how to run this SQL from a SQL query tool, go for it:

UPDATE 
  wp_usermeta 
SET 
  meta_value="a:1:{s:10:"subscriber";s:1:"1";}"
WHERE 1=1
  AND meta_key='wp_capabilities' 
  AND meta_value LIKE '%author%'

If you are not comfortable with running SQL from a query tools then you can drop this into the root of your website (call it /update-users.php or similar) and then run it by calling the URL http://example.com/update-users.php from your browser (replacing http://example.com with your actual site domain, of course):

<?php
include "wp-load.php";
global $wpdb;
$sql =<<<SQL
UDPATE
  wp_usermeta
SET
  meta_value="a:1:{s:10:"subscriber";s:1:"1";}"
WHERE 1=1
  AND meta_key='wp_capabilities'
  AND meta_value LIKE '%author%'
SQL;
$wpdb->query($sql);
echo 'Done!';

P.S. Please report back to us on your success, or if you need more help.