humanmade / network-media-library

Network Media Library plugin for WordPress Multisite
MIT License
290 stars 55 forks source link

What do you do with existing media from before you install this plugin? #63

Closed swinterroth closed 4 years ago

swinterroth commented 5 years ago

My apologies if this is the wrong place to post this but the thing is after I installed this great plugin, the media libraries of my existing Mu sites are gone. Is there a way to import the media into the global library? Thank you for your contribution to this!

johnbillion commented 5 years ago

Unfortunately there's nothing built into this plugin to handle existing media. It was built to be in place on new sites, and we didn't have a need for it to support migration of existing media that's already in place on individual sites.

To be honest I'm not sure what the best process would be to migrate your existing attachments. You'll need to iterate all your existing attachments and move them to the central media site, but that's not as simple as it sounds as you need to take into account post parents and anywhere that metadata might be stored.

Sorry I can't be of any help - to be honest your best bet might be to stick with your current system rather than trying to move all your existing media over to use Network Media Library.

I'll update the documentation to make it clear that there's currently no method of migrating existing media.

bowser845 commented 5 years ago

My logic for solving this has been to do an export of all media from the subsite, reimport them into the new master site, and then do a find and replace for any old image URLs to the newly created image URLs.

@johnbillion Can you see any issue with doing it like this?

laneparton commented 3 years ago

@bowser845 Did you happen to have any luck with that method?

bowser845 commented 3 years ago

@laneparton I didn't attempt it in the end.

laneparton commented 3 years ago

@bowser845 Thanks for responding!