I have installed wordpress on one of my servers. Now, I changed the server to use SSL certificate. If I change my wordpress URL from http to https, it ends up with infinite redirect and give below error on chrome.

"Error 310 (net::ERR_TOO_MANY_REDIRECTS): there were too many redirects"

How do I resolve it?

1 Answer

answered by
0 votes

You will have to $_SERVER['HTTPS'] = 'on'; to your wp-config.php?

And use the WP Migrate DB plugin to migrate from http://yoursite.com to https://yoursite.com

This should  work.

commented by
This  works and allows me to use website, but when I try to access admin, it gives error that you are not allowed to access this page.

Kindly help.
commented by
Also, try using below code in your wp-config.php instead of $_SERVER['HTTPS']='on';

/** SSL */  
define('FORCE_SSL_ADMIN', true);  
// in some setups HTTP_X_FORWARDED_PROTO might contain  
// a comma-separated list e.g. http,https  
// so check for https existence  
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)  
commented by (350 points)
This works! Thank you.