Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress wp-admin redirects to https

I have this problem, when I try to login in my wp dashboard (wp-admin) it redirects to a https connection.

when i type websitename.com/wp-admin, it'll show the login page but the url has is different. it says, websitename.com/login.php?redirect_to=https://websitename.com&reauth=1.

I never did anything odd, i was just editing the plugin and later on this thing happens.

What's the problem with this?

Anyone can help?

like image 462
Jetoox Avatar asked May 14 '12 06:05

Jetoox


People also ask

Why is my WP admin redirecting?

The quickest way to solve the WordPress login redirect issue is by clearing your browser cookies and cache. WordPress uses cookies to store authentication data. Sometimes your browser might retain old files, resulting in a redirect loop when you try to log in to your site.

Does WordPress automatically redirect HTTPS?

Note: If your site is hosted on our Managed WordPress hosting platform you do not need to manually change these settings, the HTTPS protocol will be configured automatically.

What can go wrong when an HTTP request is redirected to use HTTPS?

In addition, when switching from HTTP to HTTPS, you may have to re-authenticate the user and to discard the plain HTTP session identifier, if any. Otherwise, an attacker might be able to use that cookie to move to that HTTPS section of the site too and potentially impersonate the legitimate user.


2 Answers

So if you are having this issue only when you go to ../wp-admin then it is because you have force ssl admin set to true. You can find this in wp-config.php in the root of your WordPress site, you need to set this option to false.

define('FORCE_SSL_ADMIN', false);

I am assuming your siteurl in the wp_options table in the WordPressdatabase is set to a http:// address.

like image 159
RickWeb Avatar answered Sep 17 '22 09:09

RickWeb


open your wp_options table in database.

Search for siteurl and check option value of siteurl. I think that url is redirected to https. Change it to http.

like image 30
Nishi Avatar answered Sep 21 '22 09:09

Nishi