How do I password protect a page of posts on WordPress?

When you create a page and assign it to “Page for post” in Settings->Reading, it is not considered a page anymore but an archive. Taht is why standard password protection doesn’t work. You will need to build the latest posts page at your own, for example using a page template and/or pre_get_posts action.

Password protect wp-login.php

You can use .htaccess to protect your wp-login.php. The Codex describes how to do so. There are also some plugins which do that job for you, finding and choosing a good one is up to you.

Is it possible to display newly generated password after wp_generate_password()?

By default when a users submits a password reset from wp-login.php, reset_password is called. In user.php, reset_password() triggers the password_reset hook where you can see the plain text version before it is set. And the same for after_password_reset. add_action( ‘password_reset’, ‘my_password_reset’, 10, 2 ); function my_password_reset( $user, $new_pass ) { // Do something before password … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)