Remove WordPress 2.8’s Default Password Nag

WordPress 2.8 includes a Password Nag for when you’re using a default generated password. This was done intentionally to help forgetful people like myself who make new installs, and promptly forget the admin password.. You can find the Trac Ticket for it here:  #9710

I’ve been asked how to disable it, A fair enough request, and a very simple thing to achieve.

Simply put this code into a plugin, Or your theme’s functions.php:

[sourcecode lang=”php”]
remove_action(‘admin_notices’, ‘default_password_nag’);

And you’ll never see that red box again..

3 thoughts on “Remove WordPress 2.8’s Default Password Nag”

  1. Inexplicably, this doesn’t make my nags go away. Tried placing it in many places. Also tried clearing the relevant user_meta key (‘default_password_nag’) directly. Still trying to figure out what may be different about my configuration.

  2. This worked for me:

    function remove_default_password_nag() {
    global $user_ID;
    delete_user_setting('default_password_nag', $user_ID);
    update_user_option($user_ID, 'default_password_nag', false, true);
    add_action('admin_init', 'remove_default_password_nag');

Comments are closed.