WordPress enable force SSL over wp-config.php

You will need to edit domain name using the following and append it into your wp-config.php file

define('WP_SITEURL', 'https://www.example.com');
define('WP_HOME', 'https://www.example.com');
define('FORCE_SSL_ADMIN', true);
define('FORCE_SSL_LOGIN', true);
if( isset($_SERVER['HTTP_CF_VISITOR']) && strpos($_SERVER['HTTP_CF_VISITOR'], 'https') )
$_SERVER['HTTPS']='on';

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *