Reset Wordpress password hack using ftp

Software - Discutii / Probleme
(Atentie - fara linkuri catre diverse softuri Crack/Warez! - Primiti BAN instant!)

Moderator: DeeJay

Reset Wordpress password hack using ftp

Mesaj #1 » de DeeJay » 16 Mai 2023 21:26

If you forgot the wordpress login credentials, or admin account name and password, you can create a new user with administrator privileges using only ftp access to the site files:

1) login using ftp to your site
2) navigate to wp-content/themes/(active theme)
3) open functions.php
4) after first <?PHP in functions.php add this lines:
Cod: Selectaţi tot
function wpb_admin_account(){
$user = 'myadminuser'; //or whatever username you want
$pass = 'Password'; //or whatever password you want
$email = 'myemail@emailsite.xyz'; //an email address
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','wpb_admin_account');

5) save the file and open yourwordpresssite.xyz , then navigate to yourwordpresssite.xyz/wp-login.php and login with the user and password you created in step 4)
6) if you have access then edit your user and change the password
7) delete the lines of code you entered in functions.php at step 4) and save the functions.php file
8) enjoy
I spin this!
My PC: I7 3770, 16G Ram, GTX 980, SSD 180GB

Avatar utilizator




GameForest

Cea mai tare Comunitate online dedicata jocurilor!
GameForest este un loc perfect pentru toti cei care se bucura de jocuri pe internet!
Va invitam pe serverele noastre de Counter-Strike Source, Counter-Strike Global Offensive si Team Fortress 2!

Aceasta comunitate exista din 16 Mar 2011 19:37 si este online de 13 Ani, 1 Luna si 16 Zile
GameForest, WebForest are registered trademarks of IDeSys NetWorks S.R.L., Valve, the Valve logo, Half-Life, the Half-Life logo, the Lambda logo, Steam, the Steam logo, Team Fortress, the Team Fortress logo, Opposing Force, Day of Defeat, the Day of Defeat logo, Counter-Strike, the Counter-Strike logo, Source, the Source logo, and Counter-Strike: Condition Zero are trademarks and/or registered trademarks of Valve Corporation. All other trademarks are property of their respective owners. © GameForest   Powered by IDeSys NetWorks