If you’ve lost your WordPress password then it’s usually very simple to reset your password. All you need do is:
- Click Lost your password? on the login screen.
- Enter your username or password then click Get new password. You’ll see check your e-mail for the confirmation link on your screen.
- Click on the password reset URL sent in an email to you.
- Follow the next steps.
But, occasionally, the URL may not not show in the email that you receive. The instructions below describe how to solve this problem if you use the wpMandrill Plugin.
Fix password reset email problems with Mandrill and WordPress
Mandrill is a transactional email service provided by Mailchimp. WordPress by default uses the host server to send email. The problem with this is that hosts are great for webhosting but email is very much a secondary concern. Using Mandrill means that emails aren’t sent from your host but from the ultra high reliability email servers belonging to Mandrill and Mailchimp.
There are a few means of integrating WordPress and Mandrill but the simplest is by using the free wpMandrill plugin for WordPress. An issue that I’ve recently become aware of is that the link in password reset emails is stripped out meaning that a password can’t be reset.
Instructions to show the WordPress password reset link
Just follow the steps below to show the password reset link as it should.
- Go to the wpMandrill settings (from your WordPress dashboard).
- Check the
Replace all line feeds ("n") by < br /> in the message body?
checkbox. - Click Save changes.
What if you can’t login to WordPress
If for some reason you can’t login to your WordPress dashboard in order to make the change as above, then just add the following to your functions.php file.
add_filter('mandrill_payload', 'wpmandrill_auto_add_breaks'); function wpmandrill_auto_add_breaks($message) { $html = $message['html']; $is_comment_notification = ( $message['tags']['automatic'][0] == 'wp_wp_notify_moderator' ); $is_password_reset = ( $message['tags']['automatic'][0] == 'wp_retrieve_password' ); $no_html_found = ( $html == strip_tags($html) ); // Add line breaks and links to messages that don't appear to be HTML if ( $no_html_found || $is_comment_notification || $is_password_reset ) { $html = wpautop($html); $message['html'] = make_clickable($html); } return $message; }
The password URL will now show in emails sent from your WordPress website
Hi – how do I find the functions.php file?
The file will be part of your theme. If unsure then check your theme documentation.
Thank you, this helped me
Very useful advice, thanks @Gary! Missing links in a password reset email are not too user friendly..
That is awesome, It solved issue! Thank you so much.