I'm trying to migrate our companies websites over to SSL. We have 6 websites in total, migrating the 5 regular websites worked without a hitch, however our Multi Site installation is causing some weird grief.

To perform my migration I have installed an SSL Certificate on the server, used this plugin "Better Search Replace" to run through the database to update all urls from http:// to https:// site wide.

On the multisite, the media library urls are still reflecting http:// after running the search and replace, and are no longer visible on the frontend of the multisite.

I did the exact same procedure on my regular installs, and that worked without any problems. Does anybody have suggestions on how to get the media library in line?

UPDATE: I have updated all of my plugins / wordpress updates to their latest verisons. Problem persists.


When changing to SSL, be sure to edit your wp-admin > Settings > General > Wordpress Address (URL) and Site Address (URL) values to include https.

If still having troubles the media items (I believe) are built with site_url or home values (mentioned above) in _options. Verify they're https, then check out if you have a value in upload_url_path, if so verify its set to https.

If nether of those things work, within your database (presumably with phpmyadmin) check to see in _posts what the guid value is of a specific media item is (where post_type is attachment). If those are http, you can update them in to https with a script like:

UPDATE `_posts` SET `guid ` = replace(guid, 'http:', 'https:');

(always back up your database before running a query like that!)

When moving to SSL, its also recommend that on your Apache/Nginx server, you setup a redirect that forwards all http requests to https before the code is reach, this saves a lot of work and makes life a lot easier (there's thousands of how-to for that online).

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.