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

How to modify the Register link in the login page?

Let’s follow the white rabbit.

http://core.trac.wordpress.org/browser/tags/3.3.1/wp-login.php#L414

…can’t be changed, it’s hardcoded. However it leads to here when clicked:

http://core.trac.wordpress.org/browser/tags/3.3.1/wp-login.php#L481

…which has a wp_signup_location filter for multisite, which in case your site !is_multisite() will never fire off. If you’re multisite – stop here.

add_filter( 'wp_signup_location', 'wpse_46848_hijack_the_back' );
function wpse_46848_hijack_the_back( $location ) {
    return 'my-registration-page-is-better.php';
}

Not multisite, eh?

registration_redirect is what happens AFTER registration, yet it’s called before displaying the registration page. We can play dirty and hook into it and diverge into a wp_redirect with an exit() before displaying anything from the original page.

add_action( 'registration_redirect', 'wpse_46848_hijack_the_back' );
function wpse_46848_hijack_the_back( $redirect_to ) {
    wp_redirect( 'my-registration-page-is-better.php' );
    exit();
}

Note, that both add_action and add_filter work in the same way (add_action calls add_filter), and although it’s generally not advisable to mix them as things will get confusing, semantically you’re hijacking with the filter with an action, not a filter (since you’re not returning anything). If you prefer to stick to strict “a filter is a filter, an action is an action” rules do this:

add_filter( 'registration_redirect', 'wpse_46848_hijack_the_back' );
function wpse_46848_hijack_the_back( $redirect_to ) {
    wp_redirect( 'my-registration-page-is-better.php' );
    return exit();
}

Related Posts:

  1. Restrict Access to wp-login.php
  2. Redirect user after login/registration globally
  3. How do I redirect a user when he is logged in after clicking on a menu
  4. Login/Register redirect user with message
  5. Redirect User to login page
  6. Why I am not able to direct user to my blog section without login?
  7. How to disable login and registration pages?
  8. Redirect user to original url after login?
  9. Login redirect to previous page
  10. Redirect to referring page after logging in
  11. check first time login only
  12. How to change the default logout link on WordPress Admin
  13. How to redirect a sucessful registration to a page template?
  14. How to redirect after login, the working way?
  15. Password change when the user login first time
  16. Custom login form redirect to external site
  17. handling login/logout redirects
  18. Redirect to custom url when registration fails?
  19. Using `auth_redirect` : keeps asking me to login even when I’m logged in
  20. Redirect to custom URL after registering from a page with registration form
  21. Redirect users after first login
  22. Redirect to current page after wordpress login
  23. wp-login.php — redirect logged in users to custom URL
  24. Redirect to login page
  25. How to redirect action=register link on the lostpassword page to a different link?
  26. You do not have sufficient permissions to access this page
  27. Redirect user after logout
  28. how to do logout redirect to current url
  29. How to redirect user to specific page based on the input password
  30. Custom Registration page – prevent redirect to wp-login.php?action=register
  31. How to auto login after registration? [duplicate]
  32. Changing “Lost Password Email Link” to custom password reset page
  33. How to redirect user to a specific page based on username?
  34. How to redirect to home page after registration?
  35. Redirect if $_Server[‘REQUEST_URI’] is /wp-login.php?checkemail=registered
  36. Redirect after password update
  37. How to redirect user after login to a specific page?
  38. Redirect Logged In User if page is wp-login.php and $_Get[‘level’] = X
  39. Redirect when accessing /login when logged in
  40. How to redirect after login getting a variable from url (for example with the language)
  41. If User is NOT Logged in and Page ID is not 6 – Redirect to Login
  42. Redirect to Current Page after Login
  43. How to include error message on login
  44. Login redirect problem
  45. Front end user creation form! How do you keep the user on the same page in event of error?
  46. How to redirect on login to a specific page if a specific meta user is empty
  47. redirect Login problems
  48. Redirect user to previous page after signup from custom form
  49. How can I force the user to log in, even if they’re already authenticated?
  50. User is logged in after Stripe payment, then redirected, but is then logged out again
  51. Redirect users after register (first login) and force submit post
  52. Internal Links that Automatically Update
  53. Login Redirect – Multiple Scenarios
  54. WooCommerce – Redirect to a product after login
  55. Usage of the login_redirect filter
  56. Redirect user to original url after login?
  57. Prevent users from going to wordpress profile after login
  58. Custom form redirect after login
  59. Custom redirect user after login based on metadata
  60. Custom Login Form – Redirect user to login page if not logged in
  61. Redirection on Custom page
  62. Redirect user to specific link after login
  63. Load function with login_redirect
  64. Prevent “/login” to redirect to “/wp-login”
  65. redirect “about author” code to about page
  66. All URLs Redirect to Main Page
  67. How to redirect user after login to the page called by his first name?
  68. redirect doesn’t work while using example code
  69. Redirect After Login Error
  70. Redirect certain pages if user logged in
  71. Force User Login
  72. wp_login_form redirect
  73. custom login form redirect problem
  74. Login redirect to previous page
  75. Trying to re-direct users to specific page based on an ACF variable
  76. Disable redirect to homepage after successful Login, Stay on Current Page
  77. Redirect to custom login page if not logged in and redirect to home if logged in user try to login, how?
  78. wp_login_form() redirect same page
  79. How force WordPress redirect to current custom page after login
  80. Hide a Post everywhere except on redirect
  81. Conditional Login Redirect
  82. How to redirect a unique link based on login status
  83. Keep the old referrer after failed login
  84. How do I share a site only to one User at the time? Please help 🥺🙌
  85. Determine user destination on wp-login.php
  86. Redirect user after login to prior page through a wp_login hook
  87. How can force redirected to login for two or more pages to view or access
  88. Changing post depending upon where you’re redirected from?
  89. How to redirect user to Referrer Page using wp_signon in Custom Login Page in WordPress
  90. Redirect after login when WordPress in subdirectory
  91. HOW do you Redirect buddypress login to EDIT tab not PROFILE tab on profile page? [closed]
  92. Login redirects to home page and doesn’t log in
  93. WordPress not loggin user and redirecting after custom registration
  94. redirect to another page if user has registered successfully
  95. How to redirect new registrars to a custom registration page instead of WP default registration page?
  96. how redirect users to custom login page when user comment must “login to reply” is clicked?
  97. redirect_to ignoring the SSL
  98. Redirect user on login using extra field value on login form
  99. Woocommerce login to specific page or referrer
  100. wp-login.php redirect problem
Categories redirect Tags links, login, redirect, user-registration
Can a page_id and a post_id be same?
Localiztion in javascript

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