Skip to content

Instantly share code, notes, and snippets.

@lukecav
Created August 25, 2020 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukecav/0878af0675083ceb5cc87094f73e6361 to your computer and use it in GitHub Desktop.
Save lukecav/0878af0675083ceb5cc87094f73e6361 to your computer and use it in GitHub Desktop.
Force SSL Admin using a constant but not have WP-CLI complain
define('FORCE_SSL_ADMIN', true);
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){
$_SERVER['HTTPS']='on';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment