brentonstrine
brentonstrine

Reputation: 22752

WordPress is disabling HTTPS. How is it doing it and how do I stop it?

WordPress redirecting my site from HTTPS to HTTP. I'm able to access direct files (e.g. .jpg, .html) with HTTPS or HTTP as I choose. But any time I load a WordPress page of any kind, it switches to HTTP.

I know that it's not being done in the .htaccess file because the behavior does not change even when I delete everything in the file. I also tried to force HTTPS via .htaccess using the following:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

However this results in a redirect loop!

I have also tried to enable administration over SSL with this:

define('FORCE_SSL_ADMIN', true);

and this:

define('FORCE_SSL_ADMIN', true);
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
       $_SERVER['HTTPS']='on';

But in both cases, all that happens is the entire admin area of WordPress breaks.

I've also tried installing the WordPress HTTPS (SSL) plugin, but it also just breaks the entire admin section completely.

I do have iThemes Security installed, but I haven't messed with the SSL section at all. It's hosted on an Apache server with WHM/cPanel.

Upvotes: 0

Views: 122

Answers (1)

Howli
Howli

Reputation: 12469

In Settings -> General there are two fields with the url for your website (WordPress Address (URL) and Site Address (URL).

enter image description here Are they set to http or https? If they are set to http change them to https and save the changes. That should fix the problem.

Upvotes: 1

Related Questions