“You need a higher level of permission” after admin changing. Why?

Try to give yourself admin rights programmatically by placing this snippet in your functions.php.

add_action('init', function(){
    // use your user id
    $user = get_user_by( 'id', $yourUserId);

    // Give yourself the admin role
    $user->add_role( 'administrator' );
});

Leave a Comment