When I enter it is redirecting to
wp-login.php
page.
I checked the index.php
of the wp-admin folder and checked the file, it is including wp-config.php
, wp-settings.php
, wp-load.php
of the root folder and some files in wp-include
folder but I am unable to figure out which function is redirecting the wp-login.php file while entering . I even checked
auth_redirect()
function.
When I enter http://example/wordpress/wp-admin
it is redirecting to wp-login.php
page.
I checked the index.php
of the wp-admin folder and checked the file, it is including wp-config.php
, wp-settings.php
, wp-load.php
of the root folder and some files in wp-include
folder but I am unable to figure out which function is redirecting the wp-login.php file while entering http://example/wordpress/wp-admin
. I even checked auth_redirect()
function.
- wp-login.php is to take your username & password and with 'em you can still enter into your admin area. So what exactly the problem is? – Mayeenul Islam Commented Sep 30, 2013 at 7:06
- Are you saying you cant see your admin dashboard even after you are logged in as the admin? – Maruti Mohanty Commented Sep 30, 2013 at 7:09
- @MayeenulIslam...I dont have any problem. While entering the url "example/wordpress/wp-admin" it is redirecting to "example/wordpress/wp-login.php" file so I Just want to know that where the code is where it is redirecting to wp-login.php file. I have gone through the code but unable to find the code where it is redirecting to wp-login.php. – MagentoBoy Commented Sep 30, 2013 at 7:19
2 Answers
Reset to default 5Each call to an admin page loads the \wp-admin\admin.php
file.
For example, from the \wp-admin\index.php
file:
/** Load WordPress Bootstrap */
require_once( dirname( __FILE__ ) . '/admin.php' );
In that file auth_redirect()
is called.
From \wp-admin\admin.php
:
require_once(ABSPATH . 'wp-admin/includes/admin.php');
auth_redirect();
// Schedule trash collection
if ( !wp_next_scheduled('wp_scheduled_delete') && !defined('WP_INSTALLING') )
wp_schedule_event(time(), 'daily', 'wp_scheduled_delete');
set_screen_options();
auth_redirect()
does the redirect. From the inline docs:
/**
* Checks if a user is logged in, if not it redirects them to the login page.
*
* @since 1.5
*/
function auth_redirect() {
[...]
$login_url = wp_login_url($redirect, true);
wp_redirect($login_url);
exit();
I had the same problem, I tried the best possible ways.
- Uploaded the fresh files in WP-Includes and WP-Admin, it didn't work.
- I tried changing the name of plugin folder and created a blank plugins folder, it didn't work.
- I tried uploading the fresh files of the theme, it didn't work.
- I renamed the theme folder, no solution.
- List item
**5. Finally I changed the wordpress password through phpmyadmin, using the new password worked for me.****
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745275003a4619985.html
评论列表(0条)