WordPress Multisite Media Sharing

If you are using a network to publish multiple sites, reusing media library across means that a WordPress multisite media sharing is for you

By Claudio Pires
Updated on September 18, 2024
WordPress Multisite Media Sharing

If you are using multisite to publish multiple sites, then reusing media across your sites either means inserting with a URL or loading the image up twice. Hardly satisfactory. This WordPress guide will look at sharing pictures, video, and audio across your site, saving you considerable time, trouble, and disk space by sharing multisite network media library.

WordPress Multisite Media Sharing Network

When you set up a multisite network, you can use a centralized dashboard to manage multiple websites. Sometimes, a multisite setup enables you to share resources among your network’s sites, such as themes.

However, each site on your network will still have its own media library. This can be a hassle if you plan on re-using images between multiple locations. If that’s the case, you’ll need to upload them repeatedly and keep jumping from one dashboard to the next.

A central media library that all your sites can access solves those problems. While this is a niche feature, it can be constructive for multisite owners to organize their media files. Plus, it’s pretty cool, which is one of the reasons we wanted to show you how it works.

Multisite Media Library Plugin

Network Media Library is a plugin for creating a shared library across multiple sites. It works by designating one of the sites of your network as a ‘central library.’ That site will still work as usual, except any file you upload will also be available to other websites within the network.

The plugin is also plug-and-play (pardon the pun), so it’s easy to test. We should also mention that while the plugin is currently only available on GitHub, we can tell you it works as well as the one you’d find on WordPress.org.

Key Features:

  • Create a networked library for your multisite media setup.
  • Designate a site within your network to act as a central media library.
  • Easy to install and use.

How to Create a Networked Library for WordPress Multisite (In 3 Steps)

As we mentioned earlier, the plugin we will use is simple to set up. We’ll now walk you through the process of installing the plugin from GitHub and then test it to check that it’s working correctly.

WordPress Multisite Network Media Library Plugin

Downloading a plugin from GitHub is almost the same as from the WordPress.org repository. First, go to the plugin’s GitHub repository and look for the Clone or download button at the top right of the screen. Click on it and select the Download ZIP option:

You can now open your Multisite dashboard and navigate the Plugins > Add New tab. Select the Upload Plugin option and add the zip file you downloaded a minute ago: Easy as pie, right? Now, remember to activate the plugin for your network and move on to step number two.

Uploading Media Files

As you may know, your multisite dashboard doesn’t include a gallery tab. To get around that, the plugin designates one of your websites to act as a central library instead. The plugin default picks up whichever site has the ID number two.

In most cases, ID number two should correspond to the first site you created after setting up your network. For our tests, we set up a multisite dummy network (using Local by Flywheel) and added a few sites to it. In the image below, website one corresponds to ID number two:

You can also check the ID of your sites by hitting the Edit option for any of them, which will open their settings. If you take a look at the URL for that page, you’ll see an ID number at the end of it:

With that out of the way, navigate to the dashboard of the site you’ll use as your central gallery. Once you’re in, go to its Media tab and upload any image you want to test if the plugin is working. If you have a picture of a puppy, we suggest going with that one, though the WordPress multisite network media:

Next Steps on WordPress Multisite Media Sharing

Once your picture is uploaded, go ahead and access the dashboard of any other site within your network and open its media library. You should now see your test image appear here. If you’re curious, like us, you might wonder what happens if you upload a picture to the media library of site number two. We gave that a try:

After checking the media library of site number one, we can confirm that the second image also appeared in every site’s library. The takeaway is that once you install the plugin, all connected site’s media libraries will be synced up. However, your multisite network will only store a single copy of those images in your central library.

One Copy of the Uploaded File

To test whether the plugin worked correctly, we dug into our Multisite network’s directory. That means we went into our Multisite root folder and the wp-content/uploads directory. As you can see below, there are two folders inside, one for each of the websites within our test network:

Since we’re using a local setup, we ran our tests using Windows Explorer instead of File Transfer Protocol (FTP). That aside, we checked the uploads folder for website number two, and we found it to be empty: However, here’s what we found when studying the media folder for website number one:

If you recall, we uploaded that first image you see to the left to website number two. The plugin then moved it over to site number one and provided number two with access to that central library.

As you can see, the plugin works strictly as intended and doesn’t create additional copies of any of your images. As such, you can upload as many puppy photos as you want!

Why are the Media Libraries Divided?

WordPress cannot share multiple site elements (posts, media, etc.). A multisite installation is intended to facilitate the creation of numerous WordPress websites in one technical building. However, these websites should be able to be operated by different administrators or even organizations.

As a result, WordPress has chosen not to utilize a media sharing mechanism between your sites. All of the files should be kept separate, as there may be sensitive information in them. Every place in a multi-site should be isolated and have no other dependencies.

If the individual sites were not out, this would also cause technical difficulties when attempting to transfer the site out of the WordPress Multisite later.

Reasons To Not Use WordPress Multisite Media Sharing

Plugins like shared-media-library facilitate the use of a shared media library for all websites in a WordPress Multisite. Plugins like this undermine the core design of WordPress.

This was not up. For instance, WordPress’s management of upload rights has limits, making it impossible to implement significant limitations in a shared media library.

Additionally, plugins that utilize this functionality must introduce their APIs, which can be incompatible with plugins like Real Media Library. Compatibility issues and malfunctions with other plugins and your theme may occur.

Final Words

Efficiency is key when you’re managing multiple WordPress websites. Using a centralized media library for your sites can help you save time and avoid having to upload files over and over again. Three steps to create (and test) a networked library for WordPress are: Install the multisite Media Library plugin. Test the plugin by uploading a media file to a multisite network. Check if there’s only one copy of the file you uploaded.

Claudio Pires

Claudio Pires is the co-founder of Visualmodo, a renowned company in web development and design. With over 15 years of experience, Claudio has honed his skills in content creation, web development support, and senior web designer. A trilingual expert fluent in English, Portuguese, and Spanish, he brings a global perspective to his work. Beyond his professional endeavors, Claudio is an active YouTuber, sharing his insights and expertise with a broader audience. Based in Brazil, Claudio continues to push the boundaries of web design and digital content, making him a pivotal figure in the industry.