Created
June 11, 2019 19:18
-
-
Save hamedmoody/cdae2976b3ad0f875459663141c2b23b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$user_id = 1; # Insert your user ID or simply 1 for the first user that was created | |
$user_pass = 'secret'; # Insert a new password | |
$ip = '127.0.0.1'; # Insert your IP | |
if ($_SERVER['REMOTE_ADDR'] === $ip) { | |
require_once(ABSPATH . WPINC . '/registration.php'); | |
require_once(ABSPATH . WPINC . '/pluggable.php'); | |
$user = wp_update_user(array( | |
'ID' => $user_id, | |
'user_pass' => $user_pass, | |
)) ; | |
var_dump(get_userdata($user)); | |
die('disable me!'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment