If you have a Wordpress blog that you migrate to HTTPS, you may find that a lot of things are suddenly broken!   The problem isn’t evident in all browsers either.   In fact I just had a site that worked on Google Chrome on a Mac, but on in Chrome on Windows!

The problem is because of related files that are still referenced as https.   Style sheets, libraries, javascript all fail to load on certain browsers if a https script is referring to them as https.

The fix?  Add the following to your wp-config.php file:

if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on';

Add it just before the following line:

require_once(ABSPATH . 'wp-settings.php');