1

I changed url from http to https from WP Settings. After refreshing I can't access wp-login page. It says site can't be reached or too many redirects.

I have cloudlare SSL enabled. I am on VPS hosting.

Thanks

0

I had the same problem.

You need to install the plugin CloudFlare Flexible SSL https://wordpress.org/plugins/cloudflare-flexible-ssl/

As you can't login in to dashboard so you can't add that plugin now. But there is a way for this.

Just login to cpanel or just use ftp. Then createa folder inside wp-content named mu-plugins .

Now download that plugin and upload all files of that plugin in mu-plugins folder. Make sure there is no folder inside mu-plugins folder. Just upload the plugin files to mu-plugins. Then this plugin will be active automatically and your problem will be solved right away.

Hope this helps

| improve this answer | |
  • Your answer. It is not generic, I tried everything there was on internet but nothing worked for me. This saved my breath. Thank You! – Sarthak Dwivedi Dec 10 '17 at 15:42
  • Can you please select the answer as correct answer as it worked for you and so as for me. Please select the answer. this will help all of us – Md. Amanur Rahman Dec 11 '17 at 1:30
1

I also had a similar problem and a solution (if you are able to, and happy editing wpconfig.php)

The cause (simplistically):

  • Under flexible SSL your connection is only HTTPS to Cloudflare (they provide the SSL certificate).
  • Cloudflare "relays" your admin request to your server as HTTP (as far as it is concerned your server does not have an SSL cert and the connection cannot be made secure)

  • However, you have told Wordpress to serve your site under HTTPS so it responds to CF's HTTP request by returning a redirect response (i.e. instruction to request via HTTPS).

  • Another request is made and the loop repeats.

The fix:

Cloudflare's request also sends an "HTTP_X_FORWARDED_PROTO" header which identifies that your originating request was via HTTPS. We can use this to "fool" Wordpress into treating the request as HTTPS: Try adding this to the top of your wp-config.php

if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on';

(see also my article here: http://wptest.means.us.com/cloudflare-wordpress-unable-login-https/ )

For those of you who have moved to HTTPS and are experiencing problems with the look of your site under HTTPS: then using the official Cloudflare Plugin https://wordpress.org/plugins/cloudflare/ with "Automatic HTTPS Rewrites" set to "on" may help.

| improve this answer | |
0

I also had the same issue once.

The hack that I did was changing back the URL to http. Log in to C-panel, go to phpMyAdmin, and edit the 'wp_options' table.

Change back the URL from https to http.

Note:- This is just a hack to revert back your changes and log in back to your admin panel. Afterwards you can migrate to https.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.