Usually, this should help:
- Open your database (with phpmyadmin, navicat, etc)
- Open the wp_user table and have a look for the ID of your admin user (usually 1)
- Open the wp_usermeta table and search for the row that has the user_id of your user
- paste the following string into the meta_value field of the row:
a:1:{s:13:"administrator";b:1;}
that should be it:
login again and the user should be administrator again.
One advice though: Some plugins put their admin rights into that field too – those are lost after that. But deactivating/activating of the plugins could solve that.
Best way to avoid all that: Create a new user in the user table and give this user the new rights. With the new admin user you could give the old admin user the admin status back again.
br from Salzburg,
Johannes
Related Posts:
- How to check if a user is in a specific role?
- How to prevent access to wp-admin for certain user roles?
- Check if user is admin by user ID
- Only allow administrators and editors to access wp-admin
- create users to site with specific language
- Prevent from deleting any user role but subscriber
- What is the capability that permits access to WP-Admin?
- Displaying which Role the current user is assigned to
- How to hide a specific user role option in a user role list?
- Adding HTML/Text to Top of Subscriber’s Profile Backend Page
- Custom role based users are not able to access wp-admin
- Custom roles showing HTML entities in title form field
- Users Unable to Access Dashboard/Posts/Pages
- Only allow administrators and editors to access wp-admin
- Allow administrators to pick post author on custom post type edit screen
- Adding Custom Capabilites
- Restrict Author role to only 3 wp-admin pages
- Why is unfiltered_upload not working despite being enabled?
- Logout USER form backoffice after 30 minutes of inactivity [closed]
- How to set where user is redirected to after logging in at wp-login?
- User Capabilities are not available in WP REST permission callback?
- Change users.php WP_User_Query
- User Roles: How to hide a plugin from showing in WP-Admin?
- Is WordPress secure enough for a multi-user article directory?
- Newly created user role not displaying on users screen
- How to check if a user is in a specific role?
- Give wp-admin access for shop managers
- adding existing menu page on new customer user role
- Extend user search in the users.php page to allow for searching by role and excluding specified email domains from the “users search” input box
- how to Hide all products except the General Manager role in the WordPress admin panel?
- Changing Admin Menu Labels
- Changing the ‘wp-admin’ URL to whatever I want
- Unit testing in the WordPress backend (is_admin() is true)
- How can I improve the line break handling in the WYSIWYG editor?
- How do I change the login logo URL and hover title?
- Restrict admin access to certain pages for certain users
- js error on post editing page
- How to add a custom metabox to the Menu Management admin screen?
- How to change the wording in wp-admin back-end?
- Bulk Delete Users Error uri too large
- Can you change the main heading of a page in the WordPress admin (without output buffering or JavaScript)?
- Change the Return URL from the Customizer
- Where can I edit Admin Panel Page file
- How to clone wp-admin and make a new dashboard controlled by your code?
- What is an “Options Framework” for WordPress
- Failed to load resource admin-ajax.php
- show/hide toggle for subpages in wordpress admin area
- Additionally added URL params leading to “Invalid post type.” in the Admin Panel
- Custom WordPress Dashboard for Specific user role
- 404 of wp-admin pages [closed]
- Execute script only on certain admin pages
- Detecting all admins that are logged in
- Sortable columns and admin like interface for tables/report in custom plugin?
- Remove favorites action menu and screen options panel
- Prevent third party plugin’s admin page access based on user type
- An update has caused my client’s site to be non-existent after new update of WordPress [closed]
- White screen of death in Dashboard after clean installation
- WordPress (admin) posts search GET request filter
- How can I replace dashboard.css and dashboard.min.css (not add new css)
- White screen of death for wp-admin and error for wp-login.php after entering credentials
- Editor’s role in WP
- Minimum version for WordPress Backbone
- I accidentally deleted an admin user and all their content is now gone from the site. [closed]
- Detect Featured Image remove while editing post in wp-admin (client-side)
- Cannot log in to the admin, no error message [closed]
- Is wp-admin/about.php required? Can i omit it from my website
- Create reviews and star-rating for user accounts in wp-admin [closed]
- can’t access backend while frontend works perfect
- How to add Extra Column of post Status in All post page
- Developer/Designer asking for admin access
- WordPress Child theme fails to override parent theme css
- How to change home page only in WordPress
- WP Admin Login keeps redirecting to login
- Admin menu success message
- Pages section (only) not loading after publishing large number of pages
- Users can login to Website from wp-admin prior to confirmation email
- wp-admin 503 error
- Admin Page access
- Add HTML to custom post type edit page
- WP site after login keeps redirecting to looped url [closed]
- WordPress Redirects to a cancelled domain, need to change it but can’t get to the admin portal
- WordPress Admin Login Issue
- Edit “Not Available” Page
- admin-ajax and external service interaction
- Add admin page to the top of the admin panel
- Admin page changes the $_POST data
- Wp-admin Redirection loop after moving to subdirectory
- Remove menu item dashboard for a unique user
- Reestablishing Automatic and Secure FTP Connection, Primary Domain Change
- WordPress logged in but no access to wp-admin
- Changed the path to wp-login and now can’t access WPress dashboard
- Why my login panel has a wrong language?
- Mixed content and expired session issues with SSL and wp-admin
- Limit access to wp-admin but still be able to log in from different locations?
- How to Filter in the “Add Media Popup” to show only “unattached” Media
- Working with post values in the admin panel
- wordpress login blank screen [closed]
- wp-admin blank page after admin login and all security off
- Can a wordpress admin see my failed Login attempts?
- Https Website: CSS and JS files load in http and admin page does not load too