To restore super admin to just the admin
username:
<?php update_site_option( 'site_admins', array('admin') ); ?>
Place a PHP file with this line in your /wp-content/mu-plugins/
directory and access any site URL. Once done you can delete the file.
Alternative you can edit the site_admins
key directly in the wp_sitemeta
table (but the first is easier as it will be serialized data.)
You probably want to check your default_role
options also, as well as checking for other user role and capabilities in case they have been changed too.
Related Posts:
- How to create a clone role in wordpress
- How to get role of user
- How do I make a draft post accessible to everyone?
- Create custom user role (client) that can create another custom user role (employee) of that client
- Allow roles below admin to add subscribers only
- How to force listing contributors in authors dropdown menu
- Allow authors to edit only certain users
- How do I allow a specific Role in WordPress 3+ to only see certain plugins?
- Allow editors access to added plugins
- Temporarily disable user role login and replace with message
- Change role after the user has read all the posts in a category
- Do custom user roles have any default capabilities?
- Filter available WooCommerce payment gateways by role [closed]
- How to programmatically add a user to a role?
- Can i copy administrator role to another user?
- How to change role of all users with a specific role to another role?
- How to make an author archive only for certain user role and show related CPT
- Allow users to publish child pages of the pages they have access to edit
- Is there a way to set the user Role based on email domain
- pre_get_posts Remove posts based on meta value with ‘post__not_in’
- How to prevent users with “edit_others_posts” capability from editing admin posts
- Access on specific pages in wordpress for a specific user
- Change the user role after x days
- Get (echo) all role names assigned to user
- Locking Down WordPress Application Password Permissions / Capabilities
- How can I have different groups of editors only allowed to edit certain parent+subpages?
- How to let someone preview a draft?
- How can I allow user to select minimum privilege smartly
- Remove wordpress author’s capability to moderate comments on their own posts
- Are there individual memory allocations for different user roles in WordPress?
- How to redirect specific post type with user role
- Contributor disable seeing others’ posts
- Prevent Editors from Editing/Deleting Admin Accounts
- Listing child pages depending on user capability (role)
- Membership subscription, change user role when subscription runs out
- How do I display user name, role and site name using HTML tags inside a dashboard notification?
- Getting a role based on a localized role name
- Change user role after bulk-import
- Show metabox for a special role
- User Role Capabilities for WordPress Gutenberg Blocks
- How to have kind of a technical writer role in wp website
- Custom capabilities to add, edit, remove users of a particular role only?
- Undo User Role Name Change
- add_role user capability not working
- Limit a user to have access to only specified pages?
- How can I promote a user to a network administrator?
- read_private_pages capability not working for new role
- Restrict custom post content to specific user
- List users of an array of roles
- How can I programattically hide all admin notices for everyone except admin users
- How to exclude subscriber from the list in wordpress
- What Capability is required to let a role RUN code in Edit Theme?
- Want to know parameters that can be passed to user_can() for access control by user capabilities
- Block user roles from accessing the WordPress dashboard
- Create sub-administrator role that can do everything except use or see the code editor
- Can we hook the Customizer on a post or page on the front of the site?
- display user roles in comment form
- Is it proper to build a site supporting blog visitors in WordPress?
- Removing capabilities from cloned admin role
- User role editor – Add download files capability
- Setting an expiration date for wordpress roles
- Could we know who published a post on WordPress?
- Auto Change WordPress Roles
- Error while creating a clone role in wordpress
- Custom Plugin – Blacklist/Whitelist domain email and change user role – Suggestions
- Change auth_cookie_expiration for specific roles and specific login times
- Infinite redirects at front end if logged in user is not an Admin (Toolset Access)
- Set user role, if an specific role created an user
- Block access to plugins.php for custom role
- Allow user to select role from front end edit profile form
- How to make WP page accessile only to specific user roles
- Remove add post for user role
- Restrict Author to post only to a specific category
- WordPress – Limit custom/specific user role to only have access to edit the contents of an Advanced Custom Fields Pro Options Page
- TCPDF only exports .pdf when user is administrator
- How to allow suscriber to access specific pages in dashboard?
- Enable plugins for a specific user role
- Switch role on submit button
- Custom User Role – can’t edit or publish pages?
- Dropdown of user roles that depend on variable
- Add role selector to custom registration page
- Multiple user role on registration
- Trying to get new role to have edit permissions for custom content type
- Why are all roles assigned to a user when using wp_insert_user()?
- Why does user_can return false for a capability during plugin deactivation?
- Removing Admin Bar Node Based on Role
- Create an email address that forwards to users in role
- How to update user role totals
- Custom user role doesn’t show up in admin
- Welcome email specific to user role
- Assign specific editor with custom user meta “A” to all authors with custom user meta “A” and exclude all other author access
- update_user_meta on registration but only for default role type
- Grant access to admin menu?
- New folder and file permissions are not correct
- How to change user role setting in members plugin so that user can only edit his own post?
- How to assign a custom gender to a user role?
- assign roles to users in custom drop down in signup form
- Hide block of HTML if the users role is a certain role
- How might I enable a user to view Draft pages from a different Author, without the ability to edit?
- Display users by role