# A Media Library for All Websites in a Multisite

With the plugin "[External Files in the Media Library](https://de.wordpress.org/plugins/external-files-in-media-library/)," it is possible to store all files in a single shared media library within a multisite installation—accessible to every subsite within the multisite network. This helps avoid duplicating files and thus saves storage space. This article explains how to do it.

## Preliminary Notes

The "External Files in the Media Library" plugin is actually designed to reliably integrate externally hosted files into the WordPress media library so that they can be used anywhere in the project. From the perspective of individual websites, "external" files also include those that are simply located on another website. In a WordPress Multisite, there can theoretically be any number of websites that exist in parallel within the same hosting environment but are otherwise unaware of one another.

The idea to enable WordPress Multisite as a separate external source within the "External Files in the Media Library" plugin came to me after a conversation at the [WordPress Meetup in Leipzig](https://www.meetup.com/de-DE/leipzig-wordpress-meetup/). Implementation went surprisingly quickly, since the plugin already has everything needed for this. I simply had to configure the network-specific settings and make use of existing features that are already widely used.

## Prerequisites

To follow the instructions in this article, you’ll need a WordPress multisite with any number of sites within it. **You must be logged in as a super administrator** to install and activate the plugin and configure the settings.

## Warning

**My recommendation would be not to perform this setup on existing projects, but only on new installations.** The reason is that the changes made by the plugin could potentially cause existing files to be lost.

## Preparations

- First, create a backup of the entire project. This is always recommended anyway.
- If you’re unsure whether this is right for you, it’s best to try it out on a test system.

## Setup

### Installing the Plugin

Install the "External Files in the Media Library" plugin as usual under Plugins as a super administrator and activate it network-wide.

You should then see this view under "Plugins":

![](https://plugins.thomaszwirner.de/wp-content/uploads/2026/04/grafik.png)    The "External Files in the Media Library" plugin within a multisite installation.### Current Status

- On every site in the multisite network, authorized users can upload external files to the media library.
- The permissions for this are the same per site as in a single-site installation and can be customized as desired.
- Note that the super administrator always has full access to all settings across all sites. This is a feature of this role in WordPress and is not affected by the plugin.

### Enable Unified Media Library

1. As the Super Administrator, go to Network Administration.
2. Go to Settings and scroll down to "External Files in the Media Library." Here you’ll find the plugin’s network-wide settings.
3. Under "One Media Library for All Sites," select the site that should serve as the primary media library.
4. Save the settings.

![](https://plugins.thomaszwirner.de/wp-content/uploads/2026/04/grafik-4.png)    Selecting the website whose media library will serve as the basis in the network settings.### Current Status

- On every website except the selected main website, the main website has been set up as an external source. Export and synchronization settings have been configured and enabled on each of them. For exporting, the selected main website has been set as the export destination for all files to be added.
- On these same websites, no one is allowed to access the plugin’s settings anymore (not even an administrator, but the super-administrator can).
- External URLs or other external sources may still be added to these websites. Just as with normal uploads, these are stored in the central media library.
- No settings were changed on the main website.

The saved settings can be viewed in each site under Media &gt; Your External Sources:

![](https://plugins.thomaszwirner.de/wp-content/uploads/2026/04/grafik-1.png)    The saved settings for the main website’s external source within the multisite installation### A preliminary test

1. Access the backend on any website that is not your main site for the media library.
2. Go to Media &gt; Add Media. You’ll see a note below stating that files are saved on the main site when uploaded.
3. Upload a file as usual, then open the media library. You’ll see the file there with a note indicating that it was saved externally.
4. Then go to the website that serves as the central media library. Look in the media library there, and you’ll see the file you just uploaded. It isn’t treated as an external file because this is the source for all other websites.

![](https://plugins.thomaszwirner.de/wp-content/uploads/2026/04/grafik-2.png)    File in a media library that was saved as an external file on another multisite website.![](https://plugins.thomaszwirner.de/wp-content/uploads/2026/04/grafik-3.png)    The same file in the central media library.### Synchronization

To ensure that every site in the network knows which files are actually available, the plugin’s built-in synchronization feature is used. This feature synchronizes the available files between the media libraries in the network at regular intervals. In this process, the files from the central media library are stored on the other websites only as external files and not as actual files in the file system.

Synchronization runs once per hour. This setting can be adjusted for each website.

### Further Restricting Permissions

You may want to prevent website users from integrating additional external sources and using them instead of the main media library you just set up. The plugin also includes an option for this.

1. As a super administrator, access the Network Admin panel.
2. Go to Settings and scroll down to "External Files in the Media Library."
3. Here you’ll find a checkbox labeled "Hide Options."
4. Check this box and save the settings.

Enabling this setting restricts the permissions managed in WordPress for all roles across all websites so that, with regard to the media library, they can literally only upload files. They can neither add external URLs nor access external sources, nor can they save these as additional sources.

## But what about the file URLs...?

Every file saved in the central media library in this way is treated the same as any other external file with regard to its URL. The plugin uses its own proxy to obscure the URLs for accessing users while also ensuring compliance with data protection regulations. As a result, for example, when using different domains in a multisite, an external user cannot tell that the file is actually stored elsewhere.

## Conclusion

I’ve now shown how to use the "External Files in the Media Library" plugin to set up a media library within a multisite installation. It’s free to use. If you have any questions, feel free to post them in the [support forum](https://wordpress.org/support/plugin/external-files-in-media-library/).

**By the way, there’s even more you could do here:** in the website you’re using as the main media library, you could specify an external source where all files should be stored. This way, you could offload all files from all multisite websites to an external service provider with more storage space and manage everything centrally.