Where does WordPress perform the check as to whether or not a user is logged in when aaccessing admin? i.e. When I access /wp-admin/edit.php, if I am not logged in I am redirected to the login page - where (which file) is that process taking place?

1 Answer 1


It begins on this line in the admin.php file, which is a part of all admin-related backend pages in WordPress. That line calls upon the auth_redirect function, which handles the redirection.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.