Chrome 44 update break self hosted WordPress
Chrome 44 update break self hosted WordPress site. Yes it only effect Apache servers and that is not using SSL. But its wired it works fine on all other browsers only chrome is trying to redirect to https:// url.
Chrome 44 (version 44.0.2403.89) is turn on the header request with HTTPS : 1, In PHP many of the sites uses to check SSL facility with following code.
if ($_SERVER['HTTPS'] || $_SERVER['HTTP_HTTPS']) {
// thinks SSL is enabled
// so all your assets request from https:// url instead of http
...
}
So simply the assets not get from SSL url so design breaks 🙁 . a bug tracker can be found here.
Now you guys understand why the issue happen on WordPress site. This is not the issue with PHP its issue with bad coding practise, especially WordPress is a victim of all kind of issue , Now its due to above piece of code in Woo-commerce plugin , the coding styles of WordPress is such a mess when we compare to other CMS like Joomla or Drupal. I’m not going to explain why WordPress is bad compare to other CMS here. It just my point of view , bcoz I had experience on both CMS, Joomla and WordPress. even my blog is running with WP. but I prefer Joomla for secure website.
Ok, Now you guys get the idea about why WP break the things on chrome. then How can we solve the Chrome 44 update break self hosted WordPress site ?.
we have two options one is from .htaccess and other one is from function of your template. both method do the same thing just disable the HTTPS header to false.
Method 1In your .htaccess file just add the following piece of code
<IfModule mod_headers.c>
RequestHeader unset HTTPS
</IfModule>
Method 2
Just add a function in your template functions.php as follows.
function wwm_https_chrome44fix() {
$_SERVER['HTTPS'] = false;
}
add_action('init', 'wwm_https_chrome44fix',0);
Ok Now you’re good to go with chrome updates, by the way Chrome fixes this issue and released new version on July 27th 2015, This update will fix the issue and Chrome just removed the HTTP headers from the request now. So we are good to go.
If some one using older version, that may gets break your WordPress site in chrome fro them. you can use any of the above method , or If you’re not good in coding or not have any programming knowledge just use this plugin Chrome SSL fix for WP.
I hope you guys found this article to fix Chrome 44 update break self hosted WordPress site.
happy reading 🙂 🙂 🙂