How can I tell the Wordpress Media Library to work on https protocol instead of http protocol?

None of the plugins I tried so far worked, and not even defining the FORCE_SSL_ADMIN constant as true.

  • what does it mean "work on https protoco"? – Mark Kaplun May 4 '17 at 7:36
  • @MarkKaplun To load the images with https protocol. When I upload an image, at the sidebar it says "URL: http://...." and it makes the browser show a security alert. – Álvaro N. Franz May 4 '17 at 7:41
  • if this is important enough for you just move the whole site to https. any hybrid http/https site will not always be easy to manage and will depend in all kind of ways on what kind of integrations you do with 3rd party services – Mark Kaplun May 4 '17 at 7:52
  • @MarkKaplun Thanks for your time. It is important because the url is being saved as http in the database and hence creating mixed ssl alerts. I actually am using https everywhere it's just the media library creating the problems (which I know is already set as a ticket in the wordpress core fix list). Do you think using javascript to rewrite the url after uploading an image is a good solution? – Álvaro N. Franz May 4 '17 at 8:09
  • you will either need to search replace your content and replace HTTPS with HTTP, or use a filter on the_content that will do it. The first option is probably what you should do if you have a fully https site. – Mark Kaplun May 4 '17 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.