Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

How to change a user role after registering in multisite?

I understand that your question is about to establish a default role for a site, such as ‘contributor’ or ‘author’, but also when the site does not exists yet.

I found a code snippet that changes the role when the user creates a blog:

function user_role_to_new_blog($blog_id, $user_id) {
    add_user_to_blog($blog_id, $user_id, 'author' );
}

add_action( 'wpmu_new_blog', 'user_role_to_new_blog', 10, 2 );

The original link is here.

If you want a default role for the users of the already created site then you go to Network Admin -> Sites, select ‘Edit’ in a site, then ‘Settings’ tab and search for a ‘default role’ setting, you’ll see a text for the role and you can change it according to your preferences. After that, save the changes.

Cheers

Related Posts:

  1. Prevent user creating new users with specific roles
  2. A different role for each site in a multisite
  3. How to enable a site administrator to edit users in a WordPress network/ multisite setup?
  4. Possible to make custom role in multisite that can add sites?
  5. WPMU – new users are automatically subscribed to the main blog – how to prevent that?
  6. create_users capabilities on a role on multisite
  7. Allow Author on Site A capability to upload files on Site B in Multi Site
  8. Add menu items/actions for multisite users who are registered on the network but do not have a role or capability in any sites
  9. Restrict Capability of Administrator to Create, Edit and Delete Pages in Multisite
  10. Easily adding multiple existing users to a multisite site
  11. Multisite “Skip Confirmation Email” Log Out Problem
  12. How to give “author” user role appropriate capabilities to add PollDaddy polls? WordPress multisite
  13. Non-super-admin users cannot access CPT even though I have explicitly added the capabilities to the user role
  14. Where are available Roles Defined in the wp_ database?
  15. Why are my roles not visible in a Multi-site/Network?
  16. Site admin in a network install can’t edit users?
  17. How can I un-reserve a pending username registration?
  18. Allow user to select a theme to install when they signup
  19. wordpress multisite, how to keep user on subdomain throughout registration process?
  20. Troubleshooting a “You do not have sufficient permissions to access this page” error
  21. Issue with Custom Roles in Multisite
  22. Restrict Admin Capabilities in MultiSite
  23. Allowing periods in usernames
  24. Remove Site Name from register form – Multisite
  25. How can I display all Multisite blogs where this user is administrator?
  26. Add role across network in multisite
  27. Restrict users on multisite WordPress install
  28. Adding capabilities to super admins
  29. Get first_name and last_name on user_register hook
  30. How do I fix problems with users not being able to publish and only submit for review after upgrade of Multisites installation?
  31. Can’t add user to blog on registration (Multisite)
  32. Is there a wordpress function to cleanly delete an entry in the signups table?
  33. Need to manually regsiter user, send the password and retreive their user ID
  34. What are the differences in capabilities between the super-administrator and administrator?
  35. WordPress Multisite Layered Admins
  36. WordPress 3.2(Multisite) – How to add custom user meta fields to signup form?
  37. How to add multiple existing users to a multisite site?
  38. How to make wp-signup.php a 1-step process [closed]
  39. How To Remove Dashboard Menu Items for Multisite Users?
  40. How to get a user role of a specific blog in multisite?
  41. Can wp-cli display all users and their roles across all sites in a multisite instance?
  42. Can simple Admin save options in a Multisite?
  43. Identical members roles on all sites in a multisite
  44. Stuck with WordPress Multisite Custom signup page without .htaccess modification
  45. User registration on sub site
  46. In MultiSite, can some users automatically have Site Admin rights on all sites, without granting them Network Admin access?
  47. Restrict Admin Capabilities in MultiSite
  48. Disable domain redirect
  49. Within the database, where is the flag which says that a user has Super Admin rights?
  50. Update User Role Across Network when Main Site User is Updated
  51. current_user_can() always returns true if user is super admin
  52. Assign role to user on first login, if they are first (after admin)
  53. Avoid having infinite loops
  54. Get the User ID Who Owns a Given Blog ID in Multisite
  55. Create custom role, multisite, add users/sites?
  56. Make a user administrator to a sub directory site and a contributor to main site in multisite network
  57. Displaying a message upon user registration
  58. access the plugins for each role in WordPress multisite
  59. What sites are you registered to when joining a multisite?
  60. How to change user starting role in WordPress MultiSite?
  61. Add a user to a specific blog when they register?
  62. Auto creation of multisite blog on user registration
  63. Multisite – user email activation links broken
  64. Four columns in the wp_users table
  65. WP MU Register User across all blogs
  66. Is the Multi site functionality a viable option for Country and Language targeting?
  67. Subsite access without being a member of the subsite in wp multisite network
  68. Using the standard WordPress “New User” interface on a multisite
  69. Multisite user roles – capabilities not working
  70. Create Custom Multisite User Role to Reduce Capabilities
  71. How can you override the is_multisite check in wp-login.php for individual login/registration?
  72. How can I add custom meta on signup page and pass along to be used after blog activation?
  73. Users are being redirected to main site when trying to register on subsite of my Multisite network
  74. Admin permission for creating blogs in multisite
  75. How can I manually activate a new site in a wordpress multisite network?
  76. Remove superadmin role from the “change role to” menu in user listing
  77. User registration on two sites in same multisite
  78. Copy user role on multisite so the user can access subsites with same role
  79. How to sync roles across Multisite?
  80. How to fix that new users show up again in subsite of a Multisite?
  81. Allow editors to switch sites (Multisite)
  82. Multisite network admin – User’s role not showing up
  83. WordPress Multisite Add User
  84. WordPress multisite, allow non super admins to create sites
  85. User registration is currently not allowed
  86. WPMU If MU site has no administrator, deactivate site
  87. Multisite ‘Welcome User Email’ SITE_NAME returns ‘network’ name, not the name of the blog
  88. Give users acces to admin a single post or set up WP network?
  89. How can I restrict changing the max nested comment levels option to super admins?
  90. can’t create user without email for an author after converting single site to multisite
  91. User registration on wordpress multisite
  92. Language per user role, how can I achieve this?
  93. Admin users not able to see network menus
  94. Automatic registration on main site upon user registration on Multisite
  95. let user select roles in the wordpress subsites
  96. Redirect a user roll to a page after login in mutlisite network
  97. Register a user only to the root blog – WP Multisite
  98. Activate User account for Sub Site broken
  99. Possible to have duplicate usernames on different two multisites
  100. How to allow mixed case characters in multisite site name?
Categories multisite Tags capabilities, multisite, signup, user-registration, user-roles
WordPress network vs Separate installs
Some Pemalink problems, probably caused by wrong .htaccess configuration?

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress