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