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 Change Wp Register/Login URL Permanently To My Custom Page

Just customize the login URL with the login_url filter:

https://gist.github.com/tripflex/ac477b59d20bd11c5856edcffc13e5ef

add_filter( 'login_url', 'smyles_custom_login_url', 10, 3 );
/**
 * Filters the login URL.
 *
 * @since 2.8.0
 * @since 4.2.0 The `$force_reauth` parameter was added.
 *
 * @param string $login_url    The login URL. Not HTML-encoded.
 * @param string $redirect     The path to redirect to on login, if supplied.
 * @param bool   $force_reauth Whether to force reauthorization, even if a cookie is present.
 *
 * @return string
 */
function smyles_custom_login_url( $login_url, $redirect, $force_reauth ){
    // This will append /custom-login/ to you main site URL as configured in general settings (ie https://domain.com/custom-login/)
    $login_url = site_url( '/custom-login/', 'login' );
    if ( ! empty( $redirect ) ) {
        $login_url = add_query_arg( 'redirect_to', urlencode( $redirect ), $login_url );
    }
    if ( $force_reauth ) {
        $login_url = add_query_arg( 'reauth', '1', $login_url );
    }
    return $login_url;
}

Related Posts:

  1. Change register form action url
  2. Separate registration and login for different roles
  3. SSO / authentication integration with external ‘directory service’
  4. How to prefill WordPress registration with social details
  5. Woocommerce registration page [closed]
  6. WordPress registration message
  7. How to remove the WordPress logo from login and register page?
  8. Login email after registration never sent or received
  9. I want to disable E-Mail verifcation / activation when a user signs up for my WordPress site
  10. How do I check if a post is private?
  11. Receiving “This content cannot be displayed in a frame” error on login page
  12. How to customise wp-login.php only for users who are setting a password for the first time?
  13. What hooks should I use for pre-login and pre-registration actions?
  14. Problem with logging in WP users automatically
  15. Is it possible a one click user registration with Facebook or Twitter (or other Social Networks)?
  16. Register/Login using only phone number?
  17. Force users to register in order to view website [duplicate]
  18. How do I force “users must be registered and logged in” on subsites?
  19. auto login after registeration for wp-members plugin
  20. How to modify the action attribute of the wp-login.php?action=register form?
  21. Correct passwords keep appearing as incorrect
  22. Disabling standard registration login with username/email and password?
  23. Login form doesn’t log in
  24. Get the url of custom login page in the registration page
  25. By registering always make uppercase the first letter of the login
  26. Show reCaptcha on Custom Frontend Login & Register Form [closed]
  27. Best option to implement external register/login to WP from self-made API
  28. Auto Login After Registration
  29. Disable all other page except index,register,login till user login
  30. Changed Wordress Address URL Accidently
  31. What speaks against using a custom login.php / register.php to wordpress?
  32. How do I add Login fields and registration link to the header?
  33. How to make a user be able to register if such a login already exists?
  34. Sending new registration meta values to admin by email
  35. Are login functions considered part of the WP backend?
  36. WordPress registration page template
  37. Removing “public” user registration without completely turning it off?
  38. Disable registration on certain condition
  39. what is the best and safest way to allow users to register to site
  40. Updated : how to make email optional while user registration using default wordpress form
  41. Problem in auto login after registration
  42. How to invalidate `password reset key` after being used
  43. redirect_to not Including Hashtag from URL
  44. Updating usermeta from login redirect to billing address
  45. Chosen user password in registration is not being accepted on Login
  46. WordPress auto login user after registration only from a specific page
  47. User account activation links are lacking query strings
  48. Login user after registration programmatically
  49. Remember me doesn’t work with www?
  50. How to get rid of the username of registration form in theme my login wp plugin?
  51. Where do I find “log in” and “register” link which are located on the top right corner?
  52. How to force login after user browses for a few minutes or browses a few pages?
  53. Registration and Login form
  54. WordPress and Magento: let WordPress manage user registration and logins?
  55. Trim the repeated value in URL
  56. how to add custom word press regisration form in word press 3.5 with out module [closed]
  57. Click on banner to register to the blog
  58. How to put Login, Register and newsletter widget on the same page?
  59. make a login system for site visitors
  60. How to create a fully functional user registration in WordPress?
  61. Can’t access wordpress mgt dashboard until propogation finished?
  62. How reduce wordpress login session timeout time?
  63. Login members using web services
  64. How to fake a WordPress login?
  65. wp_login action hook not working
  66. Make wordpress admin failed login attempt return 401
  67. Change to nofollow tag in wp-login.php
  68. Restricting frontend acess based on user role otherwise redirect to login form
  69. Where is the query and form in wp-login.php?
  70. How to edit .htaccess to change site’s login url?
  71. “lambda_xx” on all wordpress login pages
  72. How to allow only certain users to login
  73. wp-admin folder, brute force, and password protection
  74. How to set JWT token with PHP on successful login?
  75. wp-admin redirects to subdirectory after moving installation to subdirectory
  76. Forcing SSL login, have to log in again from WP/BP-Admin Bar
  77. Call header and footer on wordpress default login page
  78. Generate email on meta value update
  79. how can redirect sign in and sign out link front-end page rather then wp-login .php in comment form in wordpress
  80. Custom code needed to be executed on login and logout
  81. Reloading page with a query string upon login for admins
  82. force login loophole
  83. Alert Message through email or phone(Message)
  84. Looking up WordPress account information from Host or php files
  85. Multiple issues with Ajax login function due to browsers and cookies
  86. Allow login only for one account from one device
  87. Recognize custom login page as wp-login.php
  88. Create a login page which redirects to a specific page?
  89. How to use google api for wordpress login
  90. Avoiding accidentally creating a second account at “Or log in with your existing social profile”
  91. How user should automatically activated and go for login?
  92. How to lock WordPress front-end with login and password?
  93. Site is not loading after relogin attempts on SSL
  94. Disabling the login form and redirect users on logout without headers sent php warning
  95. Cannot login with correct username and password anymore
  96. Warning-session start errors and cannot login to administer
  97. issue with my wp site after login
  98. How do I do so that people can register on my wordpress site?
  99. How can I automatically change directory on ssh login?
  100. How to remove without touching the pluggable.php the wordpress_logged_in cookie to show the username on login?
Categories login Tags login, urls, user-registration
Best way to tell if a user account is active, using the database only
How to pass arguments to add_action() or retrieve return value of called function?

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