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

Two admins in Users and one in the database?

That’s typically the result of users deleting accounts directly in the database. The functions that count users queries to the usermeta table to determine how many users are of a given type, when users do manual deletion they often forget to remove relational data left in the meta table, which in turn throws off the counts.

Images below are to show how what i’ve said above is true(though i’ll admit there’s always a chance this isn’t the problem you’re experiencing).

Two admins

Two admins

Deleting a user record

Deleting the user record in the users table

Viewing the list of admins after user record deletion

Seeing the misreported admin count

If you want to check the installation for redundant user meta, you could find user IDs that don’t have a corresponding record in the users table in PhpMyAdmin using some SQL.

 SELECT DISTINCT user_id FROM wp_usermeta WHERE NOT EXISTS(SELECT ID FROM wp_users WHERE ID = user_id)

If you’d like that query wrapped into some WP ready code, just ask.. 🙂

Related Posts:

  1. Create un-removeable user
  2. How to change the User name and Password of admin account
  3. Reset WordPress admin users to limit access
  4. What are the standard admin CSS id/class tags?
  5. Admin Ajax is returning 0
  6. Add custom column to Users admin panel
  7. wp_verify_nonce vs check_admin_referer
  8. Add a Separator to the Admin Menu?
  9. How to determine whether we are in add New page/post/CPT or in edit page/post/CPT in wordpress admin?
  10. how to know if admin is in edit page or post [duplicate]
  11. Modal window from within WordPress admin
  12. Where in WP can I check history or log of updates of plugins etc?
  13. Adding a custom admin page
  14. How does admin-ajax.php work?
  15. How to remove entire admin menu?
  16. How do I remove dashboard access from specific user roles?
  17. How can I speed up my WP admin section?
  18. How to pass parameters to admin_notices?
  19. Admin: very slow edit page caused by core meta query
  20. if admin is logged in
  21. Search posts by ID in admin
  22. How to Change the Default Home Page for the WordPress Dashboard?
  23. Setting admin edit panels & metaboxes positions and visibility for ALL users and admins
  24. Find out which moderator approved comment?
  25. The website cannot display the page
  26. How To Remove WordPress Version From The Admin Footer
  27. Sort pages in loop by admin’s page attributes order field?
  28. Edit “thank you for creating with WordPress” in version 3.3.1
  29. Hide other users’ posts in admin panel
  30. Set Default Admin Colour For All Users
  31. Editor Styles and Typekit
  32. WordPress admin stylesheet
  33. This CSS Stuffing Works, But Is This A Good Practice?
  34. Is it possible to create a WordPress tour? V3.3.1
  35. Securing Admin Accounts – Username Discovery
  36. is_admin() returns true when using admin-ajax.php from front end script
  37. How to save dismissable notice state in WP 4.2?
  38. How do I optimize a custom post type admin page with 25,000 posts?
  39. Settings API – adding setting fields dynamically?
  40. Disable Media Uploads to non Admin Users
  41. How do I load a CSS style into WordPress admin area only?
  42. Allowing admin-ajax.php to receive “application/json” instead of “x-www-form-urlencoded”
  43. Can an admin check passwords of registered users?
  44. How can I target WordPress 3.8 new interface MP6 with CSS?
  45. Notification that the admin is online
  46. Does wordpress create activity, update logs?
  47. sort child pages on admin
  48. How-to make the admin area mobile friendly [closed]
  49. How to remove list view from media library?
  50. How to disable the “Your site has updated to WordPress x.y.z” admin email?
  51. Load plugin scripts and styles only on plugin page
  52. Plugin to remove Admin menu items based on user role?
  53. How to obtain the user ID of the current profile being edited in WP-Admin?
  54. 3.3: How do you hide the new dashboard welcome panel?
  55. Add my own button next to “Screen options” and “Help” in the admin
  56. WP List Table custom quick edit box – post meta data missing and columns change on submit
  57. Settings API – easiest way of validating checkboxes?
  58. Are there any action like ‘init_frontend’
  59. Should I use is_admin() inside ‘admin_init’ hook callback
  60. Custom admin email for new user registration
  61. Send Admin Emails to Multiple Email Addresses
  62. How do I set up the defualt page icon for admin menu?
  63. Prevent author from changing their posts if admin has modified
  64. Cannot access admin panel
  65. Make A WordPress Page Accessible To Admins Only, Redirect Other User Roles
  66. Disable all https in WordPress
  67. localhost/wp-admin on my local redirects to production site’s /wp-admin
  68. How to remove administrator role in settings -> general -> New User Default Role?
  69. Is there a more efficient admin search function/plugin?
  70. Can a users profile be put under the dashboard menu
  71. WordPress Admins or Roles per Page
  72. Styling Shortcodes in Visual Editor
  73. initial sort order for a sortable custom column in admin
  74. Showing WP_Error message with admin_notice action hook
  75. WordPress admin screen very slow / timing out when editing or adding a new page/custom post
  76. Uploading files in admin panel?
  77. turn off new user registration emails
  78. Redirect Admin User in Dashboard
  79. Send automatic mail to Admin when user/member changes/adds profile
  80. Get current active wp color scheme
  81. Read only capability for custom post in admin area
  82. WordPress Admin back-end – advanced options page?
  83. Cannot login to WordPress Admin with SSL terminated load balancer
  84. How can ‘admin_email’ be set?
  85. Set Featured Image programmatically (in admin) with JavaScript?
  86. Disable the post save process completely
  87. use add_settings_field properly?
  88. How to change WordPress default strings?
  89. How can we customize the logo and some text on the welcome screen?
  90. front end logo upload like happytables
  91. Can I set a default dashboard layout for all users?
  92. Allow admin login at /admin
  93. Is there a hook to put stylesheet and/or JS inside iframes (thickbox or tinyMCE) in admin area
  94. How to add filter in “Comments” at the admin panel?
  95. Thickbox hacking – removing fields
  96. How to show custom menu items in the WordPress android app?
  97. How to let authors revise other authors drafts, but keep them from publishing?
  98. Modify built-in post type properties
  99. How to fix admin stylesheet muck-up? [closed]
  100. Taxonomy/category hierarchy lost when editing posts [closed]
Categories admin Tags account, admin
Create/Edit posts and auto-redirect back to listing page
Are there any filters to add additional columns to the list table on edit-comments.php?

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