0

I have a client that has 3 sites. Two of them are retail and one of them is wholesale. They all carry the same products, so the majority of the media files are the same on all 3 sites. Two of the sites are subfolders of the 'main' site.

To save drive space and effort on my part, is it possible to have a single media library and have the 3 sites share it? Could i do this by setting the media directory of 2 of the sites to a soft link to the 3rd media directory?

A multisite set up will not work for me due to the tools i'm using.

I'm assuming that the media serialized data would mess that up, but has anyone tried this before?

  • Can you elaborate more? What do you mean by"Two of the sites are subfolders of the 'main' site"? Doesn't that imply a network setup with folders? – Greeso Jul 16 '17 at 20:17
  • Also, to understand what you want. You like to upload images into one site, and then those images will be available to the other sites? Right? – Greeso Jul 16 '17 at 20:18
  • @Greeso Right. peppersprayandstunguns.com is the main site in the wp directory. psproducts.com and personalsecurityproducts.net are in subfolders in peppersprayandstunguns directory structure. The sites all have the same products on them. So when they have a new stun gun or something, i have to upload the same new pictures for the item 3 times, as all 3 sites have the same product pictures. Having the same item pictures on all 3 sites means that 3x the disc space is taken up too, and if i had only one set of images the client's browser would cache better as well. – Bearcat Jul 16 '17 at 20:31
0

Reading your comment, I think I have an idea of what to do. I will explain that idea to you, but would not be able to show any code, because it is just an idea, never implemented it yet.

I would suggest that you setup your sites to lead images from Amazon AWS S3. And on each of your sites, you would install The WP Offload S3 Plugin, and link the media files from those sites to the images in S3, but to do this last bit (linking the images), you have to write a plugin yourself, that ensure the images ID's and references are accurate to all three sites.

I hope this makes sense. If this was me, this is how I would tackle this issue.

I think you can still do it without the S3, but you would still need to write some hooks that run whenever a media file is uploaded, so you update links to those images correctly.

That said, I think using S3 is more efficient in terms of pricing.

Anyway, this is just an idea, you have to do a bit of planning and investigation first. I think it would take a month or 6 weeks to finalize by one preson.

Good luck.

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