Add admin account via FTP. Wordpress open

Add admin account via FTP. Wordpress

Add the code below to your file function.php using FTP.

function new_admin_account() {
	$user  = 'new_admin';
	$pass  = 'newpaschnagepls';
	$email = 'newemail2100@yoursite.com';
	if ( ! username_exists( $user ) && ! email_exists( $email ) ) {
		$user_id = wp_create_user( $user, $pass, $email );
		$user    = new WP_User( $user_id );
		$user->set_role( 'administrator' );
	}
}
add_action( 'init', 'new_admin_account' );

After that, go to the login page – https://yours-site.com/wp-login.php
and use:

Login –

new_admin

Password –

newpaschnagepls
0

More

Leave a Reply

Your email address will not be published. Required fields are marked *

How many?: 22 + 22

lil-code© | 2022 - 2024
Go Top
Authorization
*
*
Registration
*
*
*
*
Password generation