G’day @ilyakarpov84,
Please add this snippet to your wp-config.php file, above the lines defining ABSPATH:
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
Cloudflare now sends the X-Forward-Proto header, so you can use that setting. The snippet above implements that setting in your wp-config.php file, so you won’t need to set it in the plugin settings.
cheers,
Ross
No i setup option – unable to detect HTTPS
Do i need choose ?
HTTP_CF_VISITOR (Cloudflare Flexible SSL); deprecated, since Cloudflare sends HTTP_X_FORWARDED_PROTO now
* detected as recommended setting
And in wp-config.php file looks like :
define('WP_DEBUG', false);
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
/* Это всё, дальше не редактируем. Успехов! */
/** Абсолютный путь к директории WordPress. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Инициализирует переменные WordPress и подключает файлы. */
require_once(ABSPATH . 'wp-settings.php');
Right?
Your wp-config.php looks good to me, for most HTTPS detection problems. See how that goes.
If you still can’t get in, then you will need to stop forcing WordPress to https until you can get in to your admin. Remove any http to https redirects you might have in .htaccess, for example.
You can stop WordPress forcing your site to https by adding lines like this to your wp-config.php (replace example.com with your domain name):
define( 'WP_SITEURL', 'http://example.com/' );
define( 'WP_HOME', 'http://example.com/' );
cheers,
Ross