Resetting admin password via API
For some reason, you have managed to lock yourself out of a site you are currently developing.
Paste the following into a file (e.g. “reset.php”) in the root folder of the site, then run it.
ProcessWire version >= 2.6.9
$admin = $users->get('admin'); // or whatever your username is
ProcessWire version < 2.6.9
$admin = wire('users')->get('admin');
Authors: Nico Knoll, owzim, mindplay-dk, LostKobrakai, arjen