PHPackages                             bueltge/multisite-global-media - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. bueltge/multisite-global-media

ActiveWordpress-muplugin[Image &amp; Media](/categories/media)

bueltge/multisite-global-media
==============================

Multisite Global Media is a WordPress plugin which shares media across the Multisite network.

0.3.1(2mo ago)23132.1k↑45.8%61[45 issues](https://github.com/bueltge/multisite-global-media/issues)GPL-2.0-or-laterPHPPHP &gt;=7.0.0CI failing

Since Dec 1Pushed 1mo ago19 watchersCompare

[ Source](https://github.com/bueltge/multisite-global-media)[ Packagist](https://packagist.org/packages/bueltge/multisite-global-media)[ Docs](https://github.com/bueltge/Multisite-Global-Media)[ Fund](https://bueltge.de/impressum/#hinweis)[ GitHub Sponsors](https://github.com/bueltge)[ RSS](/packages/bueltge-multisite-global-media/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (14)Versions (22)Used By (0)

Multisite Global Media
======================

[](#multisite-global-media)

[![Build Status](https://camo.githubusercontent.com/f9862b6a1a943b537839ce9dce0c66f4bc28a39570394dc4db6e9ea298901979/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f6275656c7467652f6d756c7469736974652d676c6f62616c2d6d656469612e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/bueltge/multisite-global-media)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ae7dfce7c51e1c1f4dfa9bb00809386a18b2a2263675b39b270500557da3f6a6/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6275656c7467652f6d756c7469736974652d676c6f62616c2d6d656469612f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bueltge/multisite-global-media/?branch=master)[![Php Min Version](https://camo.githubusercontent.com/71809563a7eb42cb1b44d7623e6e4e0e7eeaa67299137f715a73ebf8560451c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6275656c7467652f6d756c7469736974652d676c6f62616c2d6d656469612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bueltge/multisite-global-media)[![MIT License](https://camo.githubusercontent.com/d4c91f6db0901df6d6ede93da4f9408d8851934c18ac940143ac9e46b2f417b8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6275656c7467652f6d756c7469736974652d676c6f62616c2d6d656469612e7376673f7374796c653d666c61742d737175617265)](./LICENSE)

*Multisite Global Media* is a WordPress plugin that shares media across the Multisite network.

Description
-----------

[](#description)

This small plugin adds a new tab to the media library, which allows you to share media from one site to all the other sites of the network. By default, the Site ID is set to '1'. You can set/change this Site ID via the filter hook `global_media.site_id` which is run in a custom plugin like so

```
add_filter( 'global_media.site_id', function() {
    return 1234;
} );
```

To get Global Media to work, please follow these steps:

1. Decide which blog/site will host the shared media for the network.
2. Add media to the media library for the chosen blog/site.
3. Find the Site ID of your chosen site by going to your Network WP Admin. In the left-hand menu, choose "All Sites", and then click on "edit" under the site you need. In the address bar, you will see `site-info.php?id=4` where the last number is the ID.

[![Finding the site ID](./assets/images/screenshot-site-id.png)](./assets/images/screenshot-site-id.png)

4. If the Site ID of your chosen site is '1', then you don't need to make any changes. If it's a different ID number, then please read the section below about modifying the Site ID via hook and a custom plugin.

Note: A useful enhancement in the Multisite context is the plugin [Multisite Enhancement](https://github.com/bueltge/wordpress-multisite-enhancements). It also helps to identify the site and get his site ID.

Set your Site ID for the Global Mediathek
-----------------------------------------

[](#set-your-site-id-for-the-global-mediathek)

If you need to change the default Site ID '1' to another value, then you can do so by creating a small custom plugin.

1. In `/wp-content/mu-plugins/` create a new folder `mgm-set-my-site-id`.
2. `In /wp-content/mu-plugins/mgm-set-my-site-id/` create a new file `mgm-set-my-site-id.php`.
3. Add the following content to 'my-plugin.php'. Change the return value to your chosen Site ID.

```
