wp-admin redirecting to wp-login.php

When I enterit is redirecting to wp-login.php page.I checked the index.php of the wp-admin folder and checked the file

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.

Share Improve this question edited Sep 30, 2013 at 6:11 fuxia 107k39 gold badges255 silver badges459 bronze badges asked Sep 30, 2013 at 5:46 MagentoBoyMagentoBoy 1231 gold badge1 silver badge4 bronze badges 3
  • 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
Add a comment  | 

2 Answers 2

Reset to default 5

Each 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.

  1. Uploaded the fresh files in WP-Includes and WP-Admin, it didn't work.
  2. I tried changing the name of plugin folder and created a blank plugins folder, it didn't work.
  3. I tried uploading the fresh files of the theme, it didn't work.
  4. I renamed the theme folder, no solution.
  5. 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

相关推荐

  • wp-admin redirecting to wp-login.php

    When I enterit is redirecting to wp-login.php page.I checked the index.php of the wp-admin folder and checked the file

    3小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信