How to reset a WordPress password

I’ve found this method today, and it works very well. I’ve just used it to reset my admin access password to a localhost installation. In fact it’s impossible to recover a password by means of an email if your system cannot send emails. This method is also very easy, and without email delivery delays in between.

  1. Open phpMyAdmin (a different MySQL web access tool should be fine, too)
  2. You should see the welcome page. Find the Database selection box and select your WordPress database
  3. You should see a list of tables, many with a common prefix, organized as links on the left and as rows on the right. Click the link wp_users (instead of wp you’ll use the prefix you chose when installing WordPress, if different)
  4. You should see the wp_users table structure, but you’re looking for its contents, so find the Browse link and click it
  5. You shoud see the wp_users table contents, one row for each registered user. Select the one with the admin value under the user_login column header and click on the Change link (with a pen icon, right below the last row)
  6. You should see a classical data entry form. In the row which has the user_pass value under the Field column header, select the MD5 value from the selection box under the Function column header, and write your new password in the text field under the Value column header. Then click Go
  7. Close phpMyAdmin
  8. Done

An enzyme for transcluding a web page

2018-06-14: This post was very different when I first published it, many years ago. Time goes by, and IFRAME is no longer that good an option when websites can specify new headers like X-Frame-Options. Meanwhile, I also had to deactivate my Enzymes plugin and only keep my newer Nzymes plugin active. Confronted with the alternative to leave this here as a useless contribution to mankind, I opted for changing the examples while keeping their original spirit instead.

Enzymes Nzymes can be complex PHP scripts, but basic enzymes are also very useful. These allow to transclude some web content into a post. Enzymes Nzymes makes it easy to do it over and over, without having to remember: “how did I do it?”

This is got by the statement {[.show-image()]}:

This is got by the statement {[.show-quote()]}:

show-image:

return "<img src='https://picsum.photos/200/300/?random' />";

show-quote:

$response = file_get_contents('https://random-quote-generator.herokuapp.com/api/quotes/random');
$decoded = json_decode($response, TRUE);
$quote = htmlspecialchars($decoded['quote']);
$author = htmlspecialchars($decoded['author']);
return "<span>$quote (by $author)</span>";

Easy, isn’t it?

TinyMCE extended

This is great! I always wondered why this TinyMCE editor in WordPress is so poor, but when you go to their web site you see many many useful buttons. Finally there is a simple way to extend the default toolbar.

The thing I probably missed most was the U button. In fact I use to render underlined text with a maroon color by means of the WordPress stylesheet. I always had to add the markup manually, and in WordPress 2.1 it got trickier because I had to make a Visual-Code-Visual roundtrip, due to the escaping facility added to the Visual side.