Add the below code block to “/wp-config.php

/* Configuration for reverse proxy. */
if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
    $_SERVER['HTTPS'] = 'on';
}



Sample Configuration