Skip to main content
26 votes
Accepted

Setting $_SERVER['HTTPS']='on' prevents access to wp-admin

Special thanks to user42826. According to the codex: If WordPress is hosted behind a reverse proxy that provides SSL, but is hosted itself without SSL, these options will initially send any requests ...
nu everest's user avatar
15 votes

Disable SSL / HTTPS for wordpress

Check your wp-config.php file for lines like: define( 'WP_SITEURL', 'https://example.com' ); define( 'WP_HOME', 'https://example.com' ); Also check your database's {prefix}_options table: SELECT ...
Pat J's user avatar
  • 11.9k
14 votes

HTTPS leads to Sorry, you are not allowed to access this page

Just a quick note, the code define('FORCE_SSL_ADMIN', true); if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on'; need to be at the top of the config file just after the <...
TheAlbear's user avatar
  • 241
12 votes

WordPress in HTTPS, causing Redirect Loops

The answer to this came in part from this answer, which linked to the Codex, advising the following snippet to be placed at the top of the wp-config file: if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO']...
robyoder's user avatar
  • 221
12 votes
Accepted

Switch from https back to http

You can try these: 1. make sure the values changed in database If you can't login to wp-admin > settings to confirm that, you can go to database, wp_options table and look for siteurl and home ...
Nabeel Khan's user avatar
8 votes
Accepted

htaccess https redirect from www to non-www

Before I give you the CODE, let me explain a few points: Point 1: It's better if you only allow https links. Mixing http & https for the same content breaks the security added by https. With ...
Fayaz's user avatar
  • 8,937
8 votes

Mixed content warnings after changing site adress from HTTP to HTTPS

This is happening because WordPress saves URLs in content absolutely by default (meaning that it's actually got your urls saved as http://example.com in the database). So to fix this you'll want to ...
Ian's user avatar
  • 979
8 votes

Local version of a Wordpress site - SSL/HTTPS enforced?

WordPress keeps WP_HOME and WP_SITEURL in DB, this is set during initial installation and usually is the domain of your website, in your case it is a domain with https. Your visiting site via local ...
sandrodz's user avatar
  • 614
7 votes

Disable SSL / HTTPS for wordpress

You can modify .htaccess file: RewriteEngine On RewriteCond %{HTTPS} on RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE]
user113337's user avatar
7 votes
Accepted

How to migrate a HTTPS WordPress installation to localhost?

This is because the site_url and homeurl of your original installation are set to HTTPS in the database, so you can't access your website on localhost unless you: Change these values to non-ssl ...
Johansson's user avatar
  • 15.3k
7 votes
Accepted

Stop WordPress and Plugins from Overwriting .htaccess

If you place your "custom" directives outside of any # BEGIN ... / # END ... comment markers then WordPress (and plugins) should not overwrite them when they update. (Of course, if you have plugins ...
MrWhite's user avatar
  • 3,881
7 votes

Why is WordPress redirecting from http to https on a local environment?

Well, at my situation... I downloaded the company website from production to localhost because I was needed to prepare a development environment for some developers. The production is using https:// ...
busythomas's user avatar
7 votes
Accepted

How do I handle SSL properly when WP is behind a reverse proxy?

You can't hook is_ssl() to override the result, and as you've noticed you can't edit WordPress Core itself or your changes will get lost if you're using built-in automatic updates. So the usual ...
Rup's user avatar
  • 4,287
5 votes
Accepted

Divert http to https with WordPress on IIS

You'll need to update all of the URLs in your database to the HTTPS protocol: Go and download Interconnect IT's Database Search & Replace Script here Unzip the file and drop the folder where your ...
Ethan O'Sullivan's user avatar
5 votes

Switching MultiSite installation from HTTP to HTTPS

I encountered the same issue: with WordPress multisite, there is no option or setting that defines if a site domain is HTTP or HTTPS. Even after replacing all occurrences in the database, a site ...
Manu's user avatar
  • 817
5 votes

Why is WordPress redirecting from http to https on a local environment?

Make sure you don't have installed and activated a plugin that forces a redirection to HTTPS, for example, the Really Simple SSL. If you have one, deactivate it on the localhost by renaming the plugin ...
Arif I.'s user avatar
  • 151
5 votes
Accepted

Wordpress redirect loop on nginx + apache reverse proxy

Issue was caused by nginx serving example.com/index.php while Wordpress was redirecting to example.com/, thus causing a redirect loop. This is the working config I used to fixed the redirect loop: ...
Capy's user avatar
  • 81
4 votes

Stop WordPress from using HTTPS and just use HTTP

There's a couple of factors here. First of all, you might want to check the site settings in wp_options (or wp_X_options if you're in a multisite setup), especially the value of: home siteurl The ...
haz's user avatar
  • 650
4 votes

Stop WordPress and Plugins from Overwriting .htaccess

Wordpress will definitely rewrite your .htaccess file under certain circumstances, such as if you change Permalinks. Like you, we have a bunch of custom things in out .htaccess file, which I'd prefer ...
haz's user avatar
  • 650
4 votes
Accepted

Redirect to https not working with .htaccess

You've put the code in the wrong place. The HTTP to HTTPS directives must go before the WordPress front-controller, otherwise it's simply never going to get processed for anything other than direct ...
MrWhite's user avatar
  • 3,881
3 votes

Load images with http urls inside https post

It's a fairly common issue when you update your WordPress site's URL form HTTP to HTTPS or if you are migrating to a new domain. While a partial solution is to update your WordPress' home and site URL ...
Ethan O'Sullivan's user avatar
3 votes

Load images with http urls inside https post

There is a pre-built tool called Search and Replace (recommended in the WordPress.org codex) that you can use to safely edit your database for just this type of change. Whether you choose to use a ...
KnightHawk's user avatar
3 votes

How to force static assets with HTTP sources to load over HTTPS?

If you are using AWS Load Balancers with SSL Termination this is what I did: Assuming you have your AWS ELB configured to do SSL termination and forwarding traffic to your Wordpress Target Group: On ...
curveorzos's user avatar
3 votes
Accepted

Wordpress behind Proxy - Mixed Content

Please take a look at Administation Over SSL, particularly the "Using a Reverse Proxy" section.
hcheung's user avatar
  • 339
3 votes
Accepted

Adding https to wordpress website

I have recently solved my issue, I went on wordpress support, found my issue and how to fix it. I installed the SSL Insecure Content Fixer plugin and chose in the plugin settings for SSL Detection, ...
Toufic Batache's user avatar
3 votes
Accepted

Infinite loop behind SSL proxy on non-standard port

Changing proxy_set_header Host $host; to proxy_set_header Host $http_host; fixed the issue. (source)
That Brazilian Guy's user avatar
3 votes
Accepted

All content is HTTPS, but browsers warn of HTTP mixed content

You have "www.wisconsinwetlands.org" URLs redirecting to insecure "http://wisconsinwetlands.org". The cases you have used these is in the images on the page. Every image that is set as "https://www."...
butlerblog's user avatar
  • 5,006
3 votes

Wordpress - https : Css and Js files are not working (load on http instead of https)

Add this code in to wp-config.php just before - require_once ABSPATH . 'wp-settings.php'; line if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on';
VKS's user avatar
  • 43
2 votes

iHow to redirect all http traffic to https now that a SSL certificate is added?

You can replace your URLs in PHPMyAdmin instead - make sure you have backed up your database though. You'd need to change this code and run it: UPDATE wp_posts SET guid = replace(guid, 'http://www....
Zoe Epix's user avatar
2 votes

Is the Wordpress HTTPS Plugin Still Safe To Use?

If you are looking to use HTTPS, I reccomend following this wordpress guide: https://make.wordpress.org/support/user-manual/web-publishing/https-for-wordpress/#implementing-https-for-wordpress You ...
jake's user avatar
  • 217

Only top scored, non community-wiki answers of a minimum length are eligible