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. How do I create a password reset link?
  80. Network Admin “You do not have sufficient permissions to access this page.”
  81. Check Password Reset Key Not Woking
  82. How to redirect user to specific page based on the input password
  83. Custom Login and Registration form in Ajax
  84. wp_login_form() passing user ID into URL on redirect?
  85. Restricting frontend acess based on user role otherwise redirect to login form
  86. How to delete Passwrd Protected posts cookies when a user logged out from the site
  87. How to get user password before being encrypted outside the wordpress core once add a new user from dashboard?
  88. Why won’t my custom login page CSS load?
  89. Hide front-end from every logged out user and redirect them to the default login page
  90. error at login page in wordpress
  91. Making WordPress available while logged into another website
  92. Custom Login page, redirection and restrictions
  93. Frontend registration form doesn’t save data only redirects to wp-login
  94. How to create session for user which is not an admin user
  95. How to delete Password Protected posts cookies when a user logged out from the site
  96. FTP Password (not private key-value pair) for EC2 Instance
  97. Looking for a way to align log in form fields with background image and scale responsively
  98. WordPress user password reset not working
  99. What forum plugin can I use to allow non-registered users to create posts and comment? [closed]
  100. Customize From and email address on password reset
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
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 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