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?
- “Too many redirects” ONLY when trying to access wp-admin page
- Admin Page Redirect
- How to increase the file size limit for media uploads?
- Sort admin menu items
- How to hook in and modify the new revisions UI (3.6+)?
- Limit widget to certain sidebar?
- How to search post by ID in wp-admin
- Disable wp-admin console for subscribers
- How to add notification bubble for my custom admin menu page
- How to display the user that published a pending post?
- Making a client area in WordPress – Any good tutorials or plugins?
- Can I rename the wp-admin folder?
- What’s the purpose of admin canonical tag?
- Copy my user account’s wp-admin dashboard layout to other users?
- How can I set up multi language admin ui?
- How to display multiple custom columns in the wp-admin users.php?
- WordPress custom permalinks not working on OS X localhost
- How to Remove Checkbox for Excerpt Under Screen Options
- Change Dashboard url
- WordPress subdomain wp-admin redirects to main domain
- Remove order field from Page Attributes box
- Disable the administration email address verification (new in 5.3)
- WordPress 3.2 Admin UI Guide
- https://mydomain/wp-admin redirects to wp-login.php?redirect_to=https%3A%2F%2Fmydomain%2Fwp-admin%2F&reauth=1
- /wp-admin/ works but website doesn’t load
- Why isn’t my email showing up as registered with WordPress anymore?
- Unable to locate WordPress Root directory
- Add column to pages table
- 404 redirect wp-login and wp-admin after changing login url [closed]
- My email address is displaying an email which does not work. What do i do?
- How do I let logged out users see the dashboard?
- Deploying WordPress for clients – what do they have access to?
- Removing Dashboard Menu Items Through The Database
- load-{$page hook} and returned parameter
- Can’t access wp-admin, redirects to http://%24domain/wp-admin/
- Is there any way to make myself an admin?
- Can log as admin but dashboard missing [closed]
- How to allow WordPress updates to only one specific administrator?
- How can I remove commas when adding tags?
- Cannot change Connection Information in admin interface
- Add custom fields to a page template, admin side
- Error messages & can’t reach admin after upgrading to 3.4.1 WordPress
- WordPress blog clone.. wp-admin issue
- How to take the help button and link off the dashboard
- Could not override the url in wp-config file
- How do I fix wp-admin error when exporting reusable blocks?
- Can’t acces login on new site
- WordPress Admin Panel Left Sidebar No showing on Post create page
- How to remove the color picker code from users-edit.php
- wp-config.php not affecting my site
- How to prevent spams from admin-ajax.php file?
- After changing Site http to https, can’t access wp login page with a digitalocean hosting
- Strange wp-admin problem for all users/adminstrators except the original one?
- Get rendered HTML of Page in Admin Area
- Having SSL enabled on admin, but disabled on post preview and live preview?
- stop customize.php redirect to login page if admin is not logged in
- Google flagged a wp-admin redirect as phishing
- Problem with admin columns
- Checkbox not showing as checked on UserProfile (even with checked=”checked”)
- Get URL of current featured image with JS in edit post view
- Custome column sort by date not title
- WordPress Admin: open popup window on a custom button
- No HTML/Visual mode option in admin panel (New Post)
- Removing Author name
- Taking over a WordPress site
- WordPress blog fails to open
- LinkControl not showing suggestions when used on admin page
- Https Website: CSS and JS files load in http and admin page does not load too
- Can’t access backend
- Can I get the role of the currentUser in modern WordPress React?