In a recent development project, I had to add a user to WordPress programmatically because I had no WP user data but only access to FTP. If this is your case, here is the code I used to add myself to the WordPress users:

<?php 
/* Add user to wordpress programmatically */
$user_name = "wpadmin";
$user_email = "[email protected]";
$user_pass = "1234";
$user_id = username_exists( $user_name );
if ( !$user_id and email_exists($user_email) == false ) {
    $random_password = $user_pass; // Alternate : wp_generate_password( $length=5, $include_standard_special_chars=false );
    $user_id = wp_create_user( $user_name, $random_password, $user_email );
} else {
    $random_password = __('User already exists.  Password inherited.');
}
print $random_password;
Deal Notice: We are using A2 hosting for all of our websites, and we are really happy with their service. So we wanted to share you this discount link for you to try it out. If you get a hosting using this link, you will also help us build better content for you: SSD Hosting - 300% Faster Than Standard Hard Drives