• Resolved Sergey Filimonov

    (@tunecatcher)


    I have added an SSL certificate to my site. It became https://filimonov.vc. But all the stylesheets broke. I thought immediately that the problem is that my site_url is still with http and the site is not loading the style content as it’s not secure. After the change the problem did not disappear though I could see https://filimonov.vc in admin settings>general panel (without styles also) and in phpMyAdmin. I tried to echo this out onto one of the pages and I saw that it echoes out https://filimonov.vc. I could change it to https://filimonov123.vc and it will echo out https://filimonov123.vc BUT NOT https://filimonov.vc. I tried to change the site_url via phpMyAdmin, via settings in the admin panel, via functions.php, via wp-config.php but this is not helping.

    Please help.

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter Sergey Filimonov

    (@tunecatcher)

    @james SSL Insecure Content Fixer

    Moderator James Huff

    (@macmanx)

    Excellent, thanks!

    @tunecatcher:

    After I added [the code into wp-config.php] I cannot access my admin area anymore. Though the users status is 0.

    Can you elaborate on that please? Did you have something else installed / active that you removed to fix this?

    cheers,
    Ross

    Thread Starter Sergey Filimonov

    (@tunecatcher)

    @webaware I have deleted the code from wp-config.php:

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

    and set the settings to https://take.ms/CzIHu

    That solved the issue.

    OK, thanks. It’s weird, I have tested with that configuration and did not get locked out of the admin, but several others have been locked out of admin using my plugin with HTTPS detection set to HTTP_X_FORWARDED_PROTO. I just wish I could reproduce that!

    Anyway, glad that you have it working.

    You should be able to turn that setting off in the plugin (i.e. set it back to “normal WordPress”) and even deactivate the plugin, then add that code to your wp-config.php file. However, when I looked at the website you had other issues such as images with http URLs, which would cause insecure content warnings. The plugin is the easiest way to resolve those (although the best way is obviously to fix them at source!)

    cheers,
    Ross

    Thread Starter Sergey Filimonov

    (@tunecatcher)

    @webaware thank you very much for your help! I’ve bought you some drink ??

    Thanks, mate! Always welcome ??

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘site_url won't recognize https://’ is closed to new replies.