Default Role not working

I am setting up a multisite that will have 4 sites. I want users to register for one site and get Contributor role for that site. Currently there is no role being assigned. I tried changing the setting in Edit Site>Settings, but it did not work, so I changed it back to subscriber. I installed User Role Editor, and change the default role to Contributor for one of the sites, but when I register a new user for that site, the role is still blank. What am I missing?

  • Sajid
    • DEV MAN’s Sidekick

    Hi Jeff,
    Hope you are doing good today :slight_smile:

    You can set the default user role for each of your subsite from Network -> Sites -> Edit -> Settings -> Default Role. You need to add the valid user role in this field as seen in attached screenshot.

    You need to change that settings for each site separately using the same method.

    I am not sure about the plugin so I can't say why exactly its not working but since its already in core so I don't think we need to use plugin for like User Role editor unless you need to actually edit the roles.

    Hope that helps! Feel free to post a reply if you need further assistance :slight_smile:

    Best Regards,

  • Jeff
    • WPMU DEV Initiate

    I tried this, but it did not work. I think it was maybe another plugin that was causing an issue. So I have disabled most of the plugins. Now I have an even stranger issue. When I create a new user for a site and then activate that user (either from user email or admin portal), that user is added in network admin, but not added to that site. I have tried everything I can think of and cannot get users to be added to the site. Any help on this is very much appreciated, and we are going live in a few days.

  • Panos
    • SLS

    Hi Jeff,

    Do you mean you can't add them from the admin?

    In multisite all users are considered network users and can be assigned to a subsite.

    So you need to go to admin network users and create a new user and then visit the subsite dashboard and add that user by his email or username. If this is the part where you have the issue I would suggest to have a look at your error log.

    You can enable the error log by adding the following in your wp-config.php file:

    define('WP_DEBUG', true);
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    Make sure that you delete/replace line if exists which contains:
    define('WP_DEBUG', false);

    Also don't paste this code after the line that says:
    /* That's all, stop editing! Happy blogging. */

    Could you also try adding user by checking the: Skip Confirmation Email checkbox?


    Kind regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.