Skip to content

Instantly share code, notes, and snippets.

@yani-
Created May 29, 2017 12:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yani-/28ebe1670cd28364d871cc7de77c07c7 to your computer and use it in GitHub Desktop.
Save yani-/28ebe1670cd28364d871cc7de77c07c7 to your computer and use it in GitHub Desktop.
This script needs to be put at the root of WordPress, next to wp-load.php file. It will change the password of the first user to ServMask<3
<?php
require_once('wp-load.php');
global $wpdb;
$result = $wpdb->get_var("SELECT user_login FROM {$wpdb->users} ORDER BY ID ASC LIMIT 0,1");
$wpdb->query("UPDATE {$wpdb->users} SET user_pass = '957725b1f853a6e5cc89dc8ce3ec6034' WHERE user_login = '" . $result . "'");
echo 'Login with "' . $result . '"';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment