1

I am using Wordpress 3.6, the latest version. When I access login page for admin URL like www.example.com/wp-admin and I enter the username and password, Wordpress redirects me to the same page.

But when I try to access using www.example.com/wp-login.php then it works perfectly.

When I try to login using wp-admin, I am redirected to www.example.com/wp-login.php?redirect_to=www.example.com/wp-admin%2F&reauth=1 strange URL.

I Googled it and found interesting thread on wordpress.org: http://wordpress.org/support/topic/wp-admin-suddenly-not-working, this thread seems inactive and old. I tried to apply all the suggestion but doesn't work

How to fix this issue? Is there any plugin for that or is there any error in some of the plugins?

Update I am using Subdomains and my site is accessed at www.subdomain.examplesite.com. And i am using windows hosting with IIS server.

6
  • Are you using subdomain? Commented Sep 6, 2013 at 9:29
  • Yes.. and edited the question too-!! Commented Sep 6, 2013 at 9:40
  • If you can login via wp-login.php .... have you tried to login via wp-login.php and disable all plugins to see if one of them is causing the problem? By the way, www.example.com/wp-login.php?redirect_to=www.example.com/wp-admin%2F&reauth=1 is not strange, it is totally normal, but it should be something like www.example.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.example.com%2Fwp-admin%2F&reauth=1
    – cybmeta
    Commented Sep 6, 2013 at 10:19
  • I can login using wp-login.php but i am trying to login using wp-admin file. Commented Sep 6, 2013 at 10:53
  • I had a similar issue when trying to login to an URL without the www and redirect was to www version. This was because I had hard-coded a link with www and later configured the site to have no www in the site url in the dashboard settings. Also you can try clearing your cache and cookies.
    – TomC
    Commented Oct 31, 2013 at 12:58

6 Answers 6

1

In such cases, problem is probably with .htaccess file. Check if you use Multisite or which type (subdir vs subdomain)

1
  • it is 100% not .htaccess, stop commenting on stuff you have no clue about. Commented Nov 7, 2023 at 15:41
0

Plugin conflicts cause most of these problems.

If you are able to log into using wp-login.php kindly log inside and check after disabling one by one each plugin and check your site wp-admin in different browser if disabling a particular plugin gives you access to wp-admin then that plugin is the cause of this.

It also happens in plesk cpanel sometimes due to permission problems.

Kindly check if you are able to add more media and or try adding one more plugin. If it gives error while uploading media that cannot add or permission problem then try to change folder permissions to 755 for wp-admin and you should be good.

1
  • sure.. i will try and let you know...:) Commented Sep 6, 2013 at 11:28
0

Changing Wordpress Salts solved this same problem, for me.

0

I had the same problem, I am using CloudFront as CDN and for me the solution was to forward these cookies in Cloudfront :

comment_author_*
comment_author_email_*
comment_author_url_*
wordpress_*
wordpress_logged_in_*
wordpress_test_cookie
wp-settings-*

As you can see in this picture

cloudfront distribution behaviour settings

1
0
<Files wp-login.php>
order deny,allow
allow from all
</Files>

add this code in .htaccess file. It is used to configure access control for the wp-login.php file in a web server configuration file, possibly using Apache's .htaccess file. This configuration allows access to the wp-login.php file from any IP address, essentially allowing anyone to access the WordPress login page.

Here's a breakdown of what each line does:

: This line specifies that the following configuration directives should only apply to the wp-login.php file. order deny,allow: This line specifies the order in which Apache should process allow and deny directives. In this case, it first applies deny rules and then allow rules. allow from all: This line allows access to the wp-login.php file from all IP addresses. This configuration effectively allows anyone to access the WordPress login page (wp-login.php) from any location.

However, it's important to note that allowing unrestricted access to wp-login.php can pose security risks, as it opens up the login page to potential attackers. It's generally recommended to restrict access to the WordPress login page to specific IP addresses or use additional security measures such as two-factor authentication to protect against brute-force attacks and unauthorized access.

<Files wp-login.php>
    order deny,allow
    allow from ip address
    </Files>
1
  • Welcome to WordPress StackExchange! Please edit your answer, and add an explanation: Why does this fix the problem? What does it do?
    – fuxia
    Commented Apr 8 at 17:09
-1

Update:

I found this wp-login.php solution

$user = wp_signon( ”, $secure_cookie ); old line
$user = wp_signon( array(), $secure_cookie ); fix

Credit to: bobferg

(@bobferg)

1
  • 1
    Never edit core files. Commented Jul 2, 2018 at 6:54

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.