Support » Fixing WordPress » Media upload not defaulting to https

  • From my searches, it seems like this has been an ongoing issue for a very long time. There are simple ways to force the admin backend and front end URLs to default to https, but no fix seems to apply new media uploads. I have been forced to regularly update the database to fix the mixed content errors.

    Has anyone found a more permanent fix via htaccess or functions.php?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    IF your site is https when you’re uploading then the images should be saved with https URLs. I don’t have this issue on any of my https sites.

    Thread Starter Kahil

    (@kahil)

    It may be my theme now that I’m looking at it closer. I’ll delve into the code a little further to make sure.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    To force SSL everywhere, use the plugin “better search replace”. Search for http://example.com and replace with https://example.com. Once done, you can delete the plugin.

    Thread Starter Kahil

    (@kahil)

    I already use that plugin. It doesn’t force SSL everywhere. It just allows you to manually do a search and replace. The moment you upload new media, you have to again do a search and replace, etc.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    If that’s happening, then something is seriously wrong with your site.

    This may be a plugin or theme conflict. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

    Thread Starter Kahil

    (@kahil)

    There’s nothing seriously wrong with my site. Disabling non-media related plugins won’t tell you anything. It’s likely a theme related issue. I’m using Enfold, which is a good theme. I’m guessing that their theme builder elements aren’t accounting for a secured site setup. I’ve left a report on their support forum to help check it out since it seems to only apply to their generated media elements. If by chance it isn’t related to the theme, I’ll update this thread with any news or fixes.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Media upload not defaulting to https’ is closed to new replies.