Running multiple WordPress websites is tough enough without having to deal with separate media libraries for each of them. If you need to reuse the same files, youβll have to upload them over and over again, which wastes a lot of time and space.
There are some great plugins to boost your WordPress multisite. In this article, weβre going to introduce you to a plugin that enables you to create a single networked library for WordPress multisite setups, and weβll teach you how to use it. Before that, letβs talk a bit more about how a networked library for WordPress can help you be more efficient!
Why a Networked Library for WordPress Can Make Your Life Easier
When you set up a multisite network, you get to use a centralized dashboard to manage multiple websites. In some cases, a multisite setup even 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 sites. If thatβs the case, youβll need to upload them over and over and keep jumping from one dashboard to the next.
Having a central media library that all your sites can access solves those problems. While this is something of a niche feature, it can be very helpful for multisite owners to organize their media files. Plus, itβs pretty darn cool, which is one of the reasons we wanted to show you how it works.
Introducing the Network Media Library Plugin
Network Media Library is a plugin that you can use to create 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 to it 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 out. We should also mention that while the plugin is currently only available on GitHub, we can tell you first-hand it works just as well as one youβd find on WordPress.org.
Key Features:
- Create a networked media library for your multisite setup.
- Designate a site within your network to act as a central media library.
- Easy to install and use.
Price:Β Free | More Information
How to Create a Networked Library for WordPress Multisite (In 3 Steps)
As we mentioned earlier, the plugin weβre going to use is simple to set up. Weβre now going to walk you through the process of installing the pluginΒ from GitHub and then test to check that itβs working correctly.
Step #1: Install the Network Media Library Plugin
Downloading a plugin from GitHub is almost the same as from the WordPress.org repository.Β First off, go to the pluginβs GitHub repository and look for theΒ Clone or downloadΒ button to the top right of the screen. Click on it and select theΒ Download ZIPΒ option:
You can now open your Multisite dashboard and navigate to 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.
Step #2: Test the Plugin by Uploading a Media File to Your Multisite Network
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. By default, the plugin 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 dummy multisite network (using Local by Flywheel) and added a few sites to it. In the image below,Β website-oneΒ corresponds to the 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 individual 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 that 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:
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 here 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.
Step #3: Check If Thereβs Only One Copy of the File You Uploaded
To test if the plugin was working correctly, we decided to dig into our Multisite networkβs directory. That means we went into our MultisiteΒ rootΒ folder and then into 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 the 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 checking 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 exactly as intended and it doesnβt create additional copies of any of your images. As such, you can go ahead and upload as many puppy photos as you want!
Conclusion
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.
All it takes to create (and test) a networked library for WordPress are three steps:
- Install the Network 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.
Do you have any questions about how to set up a networked library for WordPress Multisite? Ask away in the comments section below!
Article thumbnail image by Macrovector / shutterstock.com
Great resource! Thanks! It leaves me whit the following question:
If you have a WordPress Multisite with domain mapping (example.com / example.de / example.nl), from what URL will the images be served? I guess from the domain that hosts the centralised library, right?
That means that all my centralised images will be served from example.com instead of the domain where it’s originally uploaded?
Hi John or anyone,
How can you setup attributes, so that they can be used across a multisite on any sites added to do variations. Right now I set it us in every site and it’s so time consuming.
Thanks
Jimmy
Hi James! I’m not sure what attributes you’re referring to exactly. Could you please specify? π
I just activated a second website on a multisite and installed this plugin!
The result ? All the old pictures/documents disappeared π
It works only with new elements…any solution?
It works adding in the fuctions.php this line
`add_filter( ‘network-media-library/site_id’, function( $site_id ) {
return 1;
} );
Anyway this plugin sadly don’t work if you have already medias in the first website and then, in a second time you add a second website to the multisite.
In fact the plugin will work adding the code I gave you, but I realized that the admin roles don’t have anymore total access to the dashboard of the first website π (an admin is logged in like a subscriber..no access to pages, posts…., only to the profile and to the media library).
I wrote to the developer and sadly no solutions…
That is very odd, and it’s not an issue I’ve personally encountered. It could be a bug, or perhaps a conflict with another plugin. In this case, I recommend you reach out to the plugin’s developers via GitHub for more information. Best of luck, and I hope the issue is resolved!
Thank you for the article. I run ALL my sites in a multisite setup, so this is very relevant to me.
I have three questions.
1. Are there any migration tips for going from existing separately managed libraries to this kind of setup?
2. I use a plugin called WP Media Folder to enable me to place my resources into folders so that I can sort them more easily. Can this work inside my networked media folder?
3. Most of my network sites belong to the same set of owners, but one site belongs to a relative. At some stage, we may want to hand over the management of that site to its owner, and whoever the new WordPress techie is would probably want to host it on their their own choice of server, and they’d be responsible for the maintenance of plugins etc. Is it possible to keep that site’s media OUT of the central repository, in case of such a future migration?
This probably all boils down to a fourth question: is it better in my case to NOT use a networked media library?
Hello Tania. First of all, thank you for your comment. Unfortunately, we’re unable to provide support with specific circumstances. We recommend you reach out to the plugin developers for more specific information about its use and whether it would work with your setup. π
Is there something similar for themes and plugins?
That would be a huge time saver as well!!
Plugins already do work across multiple sites in a network installation, and so do themes. Did you mean you want to manage the configuration of the plugins all together, for example, to have all the customisations within a theme centralised across multiple sites? Because THAT isn’t possible right now, to my knowledge.
Divi is getting a multisite feature??!! lol
Guess not…But this is a good idea for my next project.
Congratulations and thank you to the author of the plugin. It works perfectly on several configurations, it is very light. Attention, it will take violence to not inflate too much.
Interesting and useful, i keep this information in the drawyer #817.242.564 on shelf #A8DF32A1 in my mind. I will need it one day!
I’m glad you found it useful. π