• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Gokul Deepak

GoCool and Debug

  • Home
  • WordPress
  • Android
  • How to
  • About Me
Home » Wordpress » wp-admin redirect loop after SSL https activation

wp-admin redirect loop after SSL https activation

August 20, 2017 by GokulDeepak Leave a Comment

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

Related

Filed Under: Wordpress

Authored by Gokul Deepak S

Reader Interactions

Leave a Reply Cancel reply

Primary Sidebar

Popular Posts

  • Home
  • How to find the date of the Facebook group it was created
  • How to add ads.txt on Bluehost
  • Elementor Plugin and Nginx Configuration
  • Cloudflare SSL off vs Flexible Vs Full vs Full Strict
  • How to block access to the wp-content uploads folder
  • Output for timedatectl list-timezones

Recent Posts

  • Can’t connect to Ubuntu with SSH
  • Change Timezone in Ubuntu 20.04 – Simple method
  • Output for timedatectl list-timezones
  • PM2 Cheatsheet – Important Commands
  • MongoDB Terminal commands – Cheatsheet

Archives

Categories

  • Android
  • Apache
  • Blogger
  • Computer Tips
  • Earn
  • Facebook Tips
  • Git
  • Google Tips
  • How to
  • Laptop Tips
  • Laptops
  • Linux
  • Mobile
  • MongoDB
  • Nginx
  • Notepad++
  • PostgresQL
  • Ubuntu
  • Wordpress
  • Xenforo

Tags

Android Android One Bluehost Comparisions Custom ROM Elementor Facebook Genesis Genesis Sample Theme Google Drive How to Lineage OS OnePlus One OwnCloud Rooting Smartphones Stock ROM Studiopress Wordpress plugin

Copyright © 2021 · Maintained by GokulDeepak