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

stop customize.php redirect to login page if admin is not logged in

to redirect all admin pages to home page when the user is not connected, try that

add_filter("login_url", function ($login_url, $redirect, $force_reauth) {

    if (!is_user_logged_in()) {
        $login_url = home_url("https://wordpress.stackexchange.com/");
    }


    return $login_url;

}, 10, 3);

If you want to redirect only on the page “customize.php”, you can add the condition at the “if”.

Related Posts:

  1. Users are redirected to homepage instead of wp-admin
  2. Can’t access admin dashboard with wp-admin without /index.php after it
  3. wp-admin – 404 after custom login form
  4. How to fix ‘WordPress redirection loop problem in wp-login.php page’?
  5. WP Admin Login keeps redirecting to login
  6. CPU overload spam – redirect link to wp-admin and new post
  7. Trying to login to my site redirects me to the first page
  8. Unable to log in as admin
  9. “Too many redirects” ONLY when trying to access wp-admin page
  10. Admin Page Redirect
  11. Unable to login and wp-login.php redirects to wp-admin%2F&reauth=1?
  12. How to redirect/rewrite all /wp-login requests
  13. Unable to login to my wordpress site. reauth=1 redirection loop
  14. Custom login redirects to wp-admin on wrong password
  15. How to allow users login to WP from external domain and make REST requests
  16. Wrong canonical link on wp-admin pages
  17. stop redirection on /wp-admin call to /wp-login
  18. wp-admin produces a 302 redirect to itself
  19. Unwanted redirect in admin area
  20. Login to wp-admin “redirect_to” points to wrong URL after migration
  21. Display sortable User meta column in admin panel user’s page
  22. How to move wp-admin login page to another location? [closed]
  23. wp-login.php — redirect logged in users to custom URL
  24. Can’t access wp-admin Internal Server Error 500
  25. Adding body class to login page?
  26. Edit a WordPress site without the username and password?
  27. comment_form – show all fields when logged in
  28. Change Dashboard url
  29. WordPress subdomain wp-admin redirects to main domain
  30. Using /wp-admin works, using /login gives a 404. Why?
  31. Cannot log into WordPress Dashboard after removing/adding .htaccess
  32. Change WP-Login or WP-Admin
  33. Why is there an intermediate redirect to https://public-url.org/wp-admin?
  34. I cannot log into my wordpress site with my wp-login.php [closed]
  35. Prevent /wp-admin/ from redirecting to homepage?
  36. How do I set the homepage to the WordPress Admin Dashboard login?
  37. Can’t access login screen, wp-login.php 404’s
  38. https://mydomain/wp-admin redirects to wp-login.php?redirect_to=https%3A%2F%2Fmydomain%2Fwp-admin%2F&reauth=1
  39. Can’t access WordPress as an admin – but I can log in as a user!
  40. Today, without warning, all admin panel logins redirect to home page after login. non-admin users logins work well
  41. Can’t login to Dashboard when changing site URL to HTTPS
  42. Detecting all admins that are logged in
  43. Redirect non-admin users away from wp-admin/index.php (main dashboard page) to wp-admin/profile.php
  44. WordPress and bbPress Login conflicts?
  45. I want to disable login of admin (/wp-admin) with email and make it accessible only with username
  46. Website looks fine, but login to wp-admin yields a blank screen
  47. cannot find the login page for local WordPress site
  48. Users disappeared from wp-admin
  49. Modify WP-Admin login fields
  50. display dynamic WP Site logo on wp-admin using CSS
  51. How to Change The WordPress Login URL Without Plugin
  52. WordPress (behind HAProxy and Jetty), not multisite, in sub folder – and /en/wp-admin/ keeps redirecting to /wp-admin/
  53. Created a new subdomain with same content. Should I add a redirect in my old subdomain?
  54. Logging into sandbox subdomain WP
  55. 404 redirect wp-login and wp-admin after changing login url [closed]
  56. Having troubles connecting to WordPress login page using Mamp
  57. Sorry, you are not allowed to access this page
  58. WP Admin/ WP Login Redirect to themselves
  59. wp-admin 302 redirects
  60. Too many redirects after added SSL redirect on port 80 virtual host
  61. Cookie Domain is preventing Admin login
  62. Require Login Redirect to Login Page
  63. Cannot access WordPress login pages
  64. Cant login to wp-admin
  65. /wp-admin/ doesn’t work but /admin/ does
  66. Why am I locked out of the system?
  67. Why can I log into wp-login.php and not wp-admin.php?
  68. Can’t access wp-admin, redirects to http://%24domain/wp-admin/
  69. Disable Admin CP authentication (or auto login)
  70. firing function at login within class
  71. WP-admin or any other is redirecting me to (This page doesn’t seem to exist.)
  72. Unable to properly login
  73. Restrict access to admin-post.php
  74. wp-login not found – All usual solutions not working
  75. how can provide access to wp_admin page for non wp_users?
  76. Redirect an entire WordPress site on a subdomain, except wp-admin
  77. Admin sometimes redirects to HTTPS
  78. Can’t connect to WP-Admin, blank error message
  79. Blank page when viewing wp-admin
  80. GoDaddy hosting wp-admin problem
  81. Too Many Redirects – WP-Admin Only
  82. define two login page url
  83. How to access wp-admin from original website after setting the domain redirect/forwarding
  84. WordPress /wp-admin redirect to wrong port in docker
  85. Login redirect_to url is pointing to a url with the port
  86. Login issue with subdomain installs
  87. Redirect from wp-admin back to page
  88. How can I can I make changes to a WP project I pulled from GItHub?
  89. Can’t access WP-Admin via HTTPS
  90. WordPress Admin Login Issue
  91. How to log into WordPress via GET/POST
  92. WordPress Admin login redirect to homepage
  93. Wp-admin Redirection loop after moving to subdirectory
  94. wp-login.php entering password nothing happens
  95. Avoid executing a function (redirect) if I’m in the admin area
  96. Admin Login Checks
  97. wp-admin redirects to standard wordpress page
  98. I cannot go to http://novathon.cloud.reply.eu/wp-admin – always redirected to /wp-login
  99. WordPress logged in but no access to wp-admin
  100. Changed the path to wp-login and now can’t access WPress dashboard
Categories wp-admin Tags login, redirect, wp-admin
using globals from wp_link_pages function
no themes or editor under appearance menu

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