Update #9 Lessons learnt after WordPress update

I don’t check my blog every day (and I think you don’t either). Just today I gave my URL to a colleague and more or less by mistake I clicked the link. And so I found out that my site was showing without any CSS and therefore being completely dis-functional. Also the admin pages did not work! Mild panic…

It has taken a few hours to figure out what happened and finally how to fix it: On May 24th an automatic WordPress update was installed. First I thought this had broken my WordPress theme. But even after hacking the database to change the theme to the default theme, the problem was still there.

After some more frustrated trial and error and a lot of googling, I finally had my “Aha Erlebnis” (https://en.wiktionary.org/wiki/Aha-Erlebnis). The new WordPress update had overwritten the wp-settings.php file. This file requires an extra line for my site to work with https. How I figured this out when I started with WordPress, is another story full of frustrations. Anyway, adding the following line to wp-settings.php solved my problems:

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

Now, is there a learning and can I avoid this problem in the future? Well, that is a YES and a NO at the same time.

Read More