Admin Access for WordPress in a SQL Database

PROBLEM:  You login to your WordPress and someone, possibly your client, has removed your admin access.

SOLUTION:

  • Open your MySQL database through phpMyAdmin (or whichever software package you use.)
  • Click on the database name (not the information schema) on the left.
  • Click on wp_usermeta.
  • Click Insert at the top.
    • unmeta_id = blank
    • user_id = number of the user id on wp_user
    • meta_key = wp_capabilities
    • meta_value = a:1:{s:13:"administrator";s:1:"1";}
  • Click Insert at the top.
    • unmeta_id = blank
    • user_id = number of the user id on wp_user
    • meta_key = wp_user_level
    • meta_value = 10
  • Click GO to save the information.

Facebooktwittergoogle_pluspinterest