Ever got that thing where you setup a wordpress site, have added a certificate and then the pages are either blank or served without style.

Make sure that you define the WP_SITEURL and WP_HOME in wp-config.php.

define('WP_HOME','https://yourdomain.com');
define('WP_SITEURL','https://yourdomain.com');

And add this condition to check for https at wp-config.php

if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] ) {
        $_SERVER['HTTPS'] = 'on';
}