Fixing WordPress HTTPS Media Links

Fixing WordPress HTTPS Media Links.

If you’ve converted your WordPress site from using HTTP to HTTPS (as I did in one of my previous articles), here is an issue that may present itself, but is simple to fix.

It’s possible that you may find some pages in your site that load fine with HTTPS, but are indicated as being insecure in the browser address bar. I stumbled upon this problem when looking at CV page that I had set up in my site (address bar with insecure notification screenshot below). Knowing the page had quite a few images, I figured they must be the cause of the problem.

Sure enough, when looking at the media library, I found that the images were hosted within the site using HTTP. The URLs are not editable, and even adding a new image while logged in as admin via HTTPS didn’t matter. Any image I uploaded defaulted to HTTP even though the site was functioning as HTTPS.

I saw a few write-ups on some blog posts about going into the database and modifying things, or to even try a few plugins.

However, what worked (and was quick and simple), was to modify the site URL within the WordPress admin console, found at Settings > General.

Fixing WordPress HTTPS Media Links (And Other Cleanup Tasks)

I had completely overlooked this during the switch to HTTPS. Making this change immediately brought my CV page to a secure state, and all images were now using HTTPS.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© Copyright MMXIX Tony Moreira Dot Com