I’ve been migrating customer WP installations to an SSL only server. For some reason some (but not all) of the media libraries seem to have gotten hard coded URLs involved. These are media objects that have been uploaded from the WP instance itself. If I look at them in the media library, the permalink shows up with the HTTPS address just fine, but most of the File-URL fields still read with the HTTP address. This is after changing the site URL in the settings.

What do I need to do to these installations so all the media embedded in pages doesn’t break?

1 Answer
1

Here’s what I did (step 3 should probably solve your problem):

1. Update .htaccess File

Add the following to the .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]

2. Update WordPress Site URL

Navigated to Settings > General and update the WordPress Address (URL) and Site Address (URL) to https.

3. Update Old http URLs

  1. Install the plugin Velvet Blues Update URLs
  2. Go to Tools > Update URLs
  3. Enter Old and New URL, e.g. Old: http://www.example.com and New: https://www.example.com
  4. Check all checkboxes and click Update URLs NOW
  5. Repeat steps 3-4 but remove “www” this time, e.g. http://example.com and New: https://example.com

Leave a Reply

Your email address will not be published. Required fields are marked *