https://stephanis.info/2011/08/11/create-new-admin-account-in-wordpress-via-ftp/
You need to download the functions.php file of the running theme, edit it in Notepad, then upload it back in.
Paste this in just before the last line, which should just be a closing php statement:
?>
But first change the parts in bold (just make up the first 2, but use a real email address for 3rd):
function add_admin_acct(){
$login = '<strong>myacct1</strong>';
$passw = '<strong>mypass1</strong>';
$email = '<strong>[email protected]</strong>';
if ( !username_exists( $login ) && !email_exists( $email ) ) {
$user_id = wp_create_user( $login, $passw, $email );
$user = new WP_User( $user_id );
$user->set_role( 'administrator' );
}
}
add_action('init','add_admin_acct');
If your functions.php is blank or doesn’t exist put
<?php
before the function code, and ?>
after it.