wp-admin automatically redirects, not able to access wordpress dashboard

4.4k Views Asked by At

When I'm trying to access my WordPress dashboard like, https://www.example.com/wp-admin then it automatically redirects to

https://www.example.com/wp-login.php?redirect_to=https%3A%2F%2Fexample.com%2Fwp-admin%2F&reauth=1

What I'm suppose to do?? and when I login to this url I'm redirect to example.com/user/

I'm not able to access WordPress dashboard

screen shot of url redirects

and when i enter username and password and try to login, it's redirect to user page

after login redirects

3

There are 3 best solutions below

8
On

It seems the problem in your .htaccess file. Please delete .htaccess file and try to login again. Then logged-in successfully.

After that, you can access your dashboard URL https://www.example.com/wp-admin.

Note: Now you need to change permalink from admin panel as:

Settings -> Permalinks 

enter image description here

Change to plain and save it. After visiting then you reset it and .htaccess file regenerate automatically.

0
On

This has Worked Form me.

Just comment out this part of code in user.php

*   do_action_ref_array( 'wp_authenticate', array( &$credentials['user_login'], 

*&$credentials['user_password'] ) );

*   if ( '' === $secure_cookie )
*       $secure_cookie = is_ssl();
*/
    /**
0
On

if u have the follow in .htaccess please remove it..then ur admin will work fine

# ensure www.
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]