Do you have questions ? We got the answers!

Ask a question:

0
do I need to reinstall wordpress after SSL certificate implementation?

Open 1 Answers 85 Views Wordpress
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

0

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.

answered by anonymous
3Comments
commented by anonymous
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 Swati
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)  
    $_SERVER['HTTPS']='on';
commented by (350 points)
This works! Thank you.
...