WordPress’te FTP ile Site Admin Oluşturma

WordPress – FTP ile Admin Oluşturma – Functions.php

Tema klasörü içerisinde bulunan Functions.php dosyasının uygun bir yerine aşağıdaki kodu ekleyin
admin giriş bilgilerinizi » admin:595959 olarak güncelleyecektir.

function add_admin_acct(){
	$login = 'admin';
	$passw = '595959';
	$email = '[email protected]';

	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');