wp-admin redirect loop after SSL https activation

the website loads correctly but I can’t access wp-admin page in wordpress. This is after installing SSL certificate.

Method 1:  simply add this code in simply add this code in wp-config.php file in your root folder. you can access it through FTP. It worked like a champ for me.

/** 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';

Method 2:

Add these lines in the wp-config.php file

define('WP_HOME','https://www.example.com/');
define('WP_SITEURL','https://www.example.com/');

Any one of the above two method will work. For me, the First method worked like a champ for wp-admin redirect loop after SSL https activation

Gokul Deepak S

Recent Posts

Running crontab on AWS auto scaling group

Linux has a convenient feature of running cronjob which will get executed at the correct…

4 months ago

Learn with Gokul

As famous Tamil poet Auvaiyar said "Katradhu Kai Mann Alavu, Kallathathu Ulaga Alavu" which is…

4 months ago

Terraform Cheat sheet

Terraform Cheatsheet with pdf. You can download Terraform Cheatsheet pdf with all Terraform CLI commands…

4 months ago

Strategy to prepare for Terraform Associate Exam Preparation

I was planning to do Terraform certification a long time ago. I have worked on…

4 months ago

Runcloud vs SiteGround Comparision

As a user of both of these services has got multiple benefits with both of…

1 year ago

Important Docker Commands to remember

You need not memorize these important docker commands. Repeated usage will make it easy for…

1 year ago

This website uses cookies.