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

Post #1 » by DeeJay » 16 May 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:
Code: Select all
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

User avatar




GameForest

The best online Gaming Community!
GameForest is the perfect place for all gamers!
Join our Counter-Strike Source, Counter-Strike Global Offensive and Team Fortress 2 dedicated servers and have a great fun time!

Forum started on 16 Mar 2011 19:37 and in existence for 13 Years, 2 Months and 1 Day
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