E
E
Egor Chebotarev2016-06-29 17:20:37
Digital certificates
Egor Chebotarev, 2016-06-29 17:20:37

How to get rid of ERR_TOO_MANY_REDIRECTS when migrating a site from HTTP to HTTPS on Wordpress?

Switching from http to https.
–Connected the ssl-certificate through the admin panel of the site – everything is in order, the site began to work via https, but did not download files from http, displaying Mixed Content in the console.
– I registered WP_HOME and WP_SITEURL in wp-config.php, after which the site stopped responding with an error ERR_TOO_MANY_REDIRECTS

Notes:
– I tried to replace all links in the mySQL database with relative ones
– the WP theme has a child theme
– there are no plugins that could arrange a redirect

How to fix?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mr Crabbz, 2016-06-29
@Egche

I had exactly the same problem.
Add to wp-config.php at the very beginning (after <?php ):
Plus below, after any define (before the text "/* That's it, don't edit it further. Good luck! */"):

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

If you have problems with image paths, install this plugin:
https://wordpress.org/plugins/velvet-blues-update-urls/
And replace http://your_domain with https://your_domain with it

S
Sergey Petrenko, 2016-06-29
@digitalHitler

Where do redirects lead? Or rather, where and where.
In the console, the Network tab.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question