Skip to content

Instantly share code, notes, and snippets.

@detain
Created February 27, 2020 04:43
Show Gist options
  • Save detain/3463707a5e01f107b56a54386b43e8ac to your computer and use it in GitHub Desktop.
Save detain/3463707a5e01f107b56a54386b43e8ac to your computer and use it in GitHub Desktop.
Generates a WordPress Hashed Password
<?php
/**
* Generates a WordPress Hashed Password
* - Written by detain@interserver.net
*/
if (file_exists('public_html')) {
require __DIR__.'/public_html/wp-load.php';
} else {
require __DIR__.'/wp-load.php';
}
$pass = $_SERVER['argv'][1];
echo "Hashed password '{$pass}' is " . wp_hash_password($pass).PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment