79104684

Date: 2024-10-19 10:30:28
Score: 1.5
Natty:
Report link

The issue with your MySQL command is that while you correctly added the capabilities in wp_usermeta, you missed adding the wp_user_level key, which is necessary for WordPress to fully recognize the user's role and grant dashboard access. To properly create an administrator user via MySQL, you should first insert the user into wp_users, retrieve the user ID, then insert both the wp_capabilities and wp_user_level meta keys into wp_usermeta, setting wp_capabilities to 'a:1:{s:13:"administrator";b:1;}' and wp_user_level to 10. To fix the duplicate capabilities, you can remove one of the entries from wp_usermeta.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Logan Asher