Mili Dubey
Mili Dubey

Reputation: 143

Change Wordpress media image URL

I'm relatively new to wordpress development. I installed SSL certificate on my website. The SSL padlock is not visible on some pages and figured it was a mixed content issue due to image urls uploaded as media in wordpress referencing http instead of https. I changed site url from settings as well as tried a search and replace url using better search replace plugin and velvet blues update url but my media images are still referencing http. Neither did Really Simple SSL nor did SSL insecure content fixer help. I couldn't find much help online. Please guide me to update urls of images stored in wordpress media. Thank you.

Upvotes: 0

Views: 1735

Answers (1)

danielh
danielh

Reputation: 354

You can try changing the upload_url_path value in the wp_options table to force HTTPS on uploaded media. Example:

UPDATE wp_options
SET option_value = 'https://example.com/wp-content/uploads'
WHERE option_name = 'upload_url_path';

EDIT - It is odd, though, that a find and replace didn't remedy the problem. Do you or your host use object caching? If yes, you may need to purge it after performing such database changes.

Upvotes: 2

Related Questions