在wp-config.php里面加入 define('FORCE_SSL_ADMIN', true); if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false){ $_SERVER['HTTPS']='on'; } 记得要放到wp-settings.php加载之前
在wp-config.php里面加入
记得要放到wp-settings.php加载之前