Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Where is the email content for retrieve_password_message stored?

WordPress uses custom wp_mail function, so you won’t find it, if you’ll search for mail.You should find retrieve_password_message filter call there. This is the filter that returns the content of reset password message.

// Change the message/body of the email
add_filter( 'retrieve_password_message', 'rv_new_retrieve_password_message', 10, 4 );
function rv_new_retrieve_password_message( $message, $key, $user_login, $user_data ){
    /**
     *  Assemble the URL for resetting the password
     *  see line 330 of wp-login.php for parameters
     */
    $reset_url = add_query_arg( array(
        'action' => 'rp',
        'key' => $key,
        'login' => rawurlencode( $user_login )
    ), wp_login_url() );
    ob_start();

    printf( '<p>%s</p>', __( 'Hi, ' ) . $user_fname );
    printf( '<p>%s</p>', __( 'It looks like you need to reset your password on the site. If this is correct, simply click the link below. If you were not the one responsible for this request, ignore this email and nothing will happen.' ) );
    printf( '<p><a href="https://wordpress.stackexchange.com/questions/217980/%s">%s</a></p>', $reset_url, __( 'Reset Your Password' ) );

    $message = ob_get_clean();
    return $message;
}

In wp-login,You can find function that retrieve password.

 /**
177  * Handles sending password retrieval email to user.
178  *
179  * @uses $wpdb WordPress Database object
180  *
181  * @return bool|WP_Error True: when finish. WP_Error on error
182  */
183 function retrieve_password() {}

I advice you please do not edit core files of WordPress use hook/filter in function.php file.I hope this will help you.

Related Posts:

  1. What is the CODEX intercept for wp-login.php?action=lostpassword
  2. Disable Or Redirect WP-login.php
  3. wordpress redirect after password reset
  4. How can I modify the default reset (lost) password email text?
  5. login_enqueue_scripts does not ovewrite the default styles
  6. Modify wp-login.php labels: Username to Email
  7. How to change “Registration complete. Please check your e-mail.” in wp-login.php
  8. How to customise wp-login.php only for users who are setting a password for the first time?
  9. How to use wp-login.php page only for logout?
  10. Remove lost password form and URL
  11. change register url on wp-login page
  12. Enqueue style for Password Reset page
  13. Can’t access wp-admin
  14. How do you add a custom link to the wordpress login page?
  15. wp-login.php register/lost password links to buttons?
  16. How to trigger a login form notice message?
  17. A child theme version of wp-login
  18. reset password label text change
  19. Add text on wordpress admin login page
  20. Is it possible to remove the version number from the wp-login.php page?
  21. reset password link redirect to login page
  22. Custom login form for front-end user as well as admin
  23. Password reset – Disabled for LDAP accounts
  24. wp_login_form() redirect not redirecting users < admin
  25. Use Password Protected Form without the use of wp-login.php
  26. Login redirect on wp theme
  27. Can’t log in. Log in button missing [closed]
  28. Require WP login for outside access
  29. Modify WP-Login Page With Javascript?
  30. Deep customization of wp-login.php
  31. if username or password is incorrect wp-login returns a blank page
  32. Call header and footer on login page
  33. Prevent redirect on custom wordpress login form
  34. Is there anyway to get the inputted password string from the login form?
  35. How do I create a function that modifies a message in the wp-login.php file?
  36. Replace standard Login and Register form for Woocommerce [closed]
  37. How to destroy sessions after a user logout [closed]
  38. How to add required attribute to wp_login_form fields?
  39. wordpress login without password just email address (NO 2 factor authentication with email)
  40. WordPress “remember me” – How should it work?
  41. Changing the title of “
  42. Requiring wp-login.php sends headers automatically
  43. Log In & Log Out Code In Header
  44. How to fix Sign In option in WordPress
  45. How can I redirect on a url after successful registration?
  46. I lock the site’s contents, click on a post, redirect to login, enter uname+password but fail to redirect to article
  47. How to access the actual input html of the login form
  48. Creating a custom login on site.
  49. Temporally disable password to login with empty password?
  50. Login page wordpress tagline remove [duplicate]
  51. Adding line break in esc_html__
  52. After limiting the access to my wp-login.php by IP through .htaccess, all my password-protected posts stopped working. What’s the best solution now?
  53. Copying My account/Login/Register button outside header
  54. When I enter password, I’m redirected to the WordPress login form
  55. Issue with cookies in wp-login
  56. Login form does not store/remember/suggest users password
  57. wp_set_password() does not work!
  58. Add content in wp login page
  59. Is it possible to check if password is correct in wp_authenticate_user?
  60. Modify login page after clicking “login” button, and before it arrives at redirect
  61. How to enable “remember me” checkbox in login forms by default?
  62. Custom password set/reset link in same URL format as default does’t work
  63. custom login query for custom login form?
  64. WordPress reCAPTCHA Problem
  65. Customizing WordPress Login URL
  66. It is possible that to get data in wp_login.php to your own php file in wordpress?
  67. Using gettext on wp-login.php won’t change “Back to site name” text
  68. Add video to wordpress login page
  69. WordPress login form with fancybox
  70. Can I use core passworded page/post functions outside of wp-login.php?
  71. I wanna create a custom login form template
  72. Add custom field in wp_login_form()
  73. Retrieve password only by login. Users with same email
  74. wp-login.php not returning error messages / or gives 404
  75. Registration page background color covering 1 screen not covering full page
  76. Custom error messages for login and lost password forms
  77. How to Disable Pre-population of Password on Password Reset
  78. WordPress does not allow me to login until another dashboard is open
  79. Customize WordPress Password-Reset Behavior
  80. Sending the reset password link programatically
  81. How to change user password with wp-cli?
  82. How can I redirect user after entering wrong password?
  83. Unable to login and wp-login.php redirects to wp-admin%2F&reauth=1?
  84. Disable user registration password email
  85. Where to securely store API keys and passwords in WordPress?
  86. Check for correct username on custom login form
  87. The website cannot display the page
  88. Add error message on password protected page
  89. Missing URL in password reset email
  90. Loosen/disable password policy
  91. Password Protect Custom Page
  92. How do I require authorization / login to view a specific set of posts / pages?
  93. Custom login form
  94. Why are passwords exportable as plain text in WordPress?
  95. Password Reset for Users on a Multisite Subsite
  96. How to protect pages with double authentication: password + email (in custom field)
  97. Enforcing password complexity
  98. Password protecting a page
  99. How do I create a password reset link?
  100. Replacing the WordPress password validation
Categories wp-login-form Tags password, wp-login-form
How to remove Date from Meta Description on SERP?
can’t see aditional themes in control panel

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress