admin管理员组

文章数量:1134589

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.

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.

Share Improve this question edited Dec 8, 2017 at 16:17 Nebri asked Dec 8, 2017 at 15:34 NebriNebri 2611 silver badge7 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

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).

本文标签: Migrating MultiSite to SSL Media Library not updating