Title: safecss and HTTPS mixed content errors. Fix included.
Last modified: August 20, 2016

---

# safecss and HTTPS mixed content errors. Fix included.

 *  [Dan Collis-Puro](https://wordpress.org/support/users/djcp/)
 * (@djcp)
 * [14 years ago](https://wordpress.org/support/topic/safecss-and-https-mixed-content-errors-fix-included/)
 * A minor change is needed to make safecss work properly when a site is being viewed
   under HTTPS context – otherwise it’ll use “siteurl” directly from wp_options 
   which, in all likelihood, is using the http:// protocol. This will cause mixed
   content errors and browsers will throw up scary looking “site not secure! omgwtfbbq”
   errors.
 * On line 433 of safecss/safecss.php, replace:
    `$href = get_option( 'siteurl' );`
 * to:
 * `$href = site_url();`
 * [http://wordpress.org/extend/plugins/safecss/](http://wordpress.org/extend/plugins/safecss/)

Viewing 1 replies (of 1 total)

 *  [Brian Zoetewey](https://wordpress.org/support/users/omicron7/)
 * (@omicron7)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/safecss-and-https-mixed-content-errors-fix-included/#post-2768328)
 * If using the “Start from scratch . . .” option, then line 452 needs to change
   as well.
    from: `return 'http://' . $_SERVER['HTTP_HOST'] . '/wp-content/plugins/
   safecss/blank.css';` to: `return plugins_url( 'blank.css', __FILE__ );`

Viewing 1 replies (of 1 total)

The topic ‘safecss and HTTPS mixed content errors. Fix included.’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/safecss.svg)
 * [WordPress.com Custom CSS](https://wordpress.org/plugins/safecss/)
 * [Support Threads](https://wordpress.org/support/plugin/safecss/)
 * [Active Topics](https://wordpress.org/support/plugin/safecss/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/safecss/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/safecss/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Brian Zoetewey](https://wordpress.org/support/users/omicron7/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/safecss-and-https-mixed-content-errors-fix-included/#post-2768328)
 * Status: not resolved