How to setup shared media for WordPress multisite?

Time needed: 10 minutes.

By default each site in WordPress multisite has its own media. However, if you want all sites to share same Media then that can be achieved using “Network Media Library” plugin. If you are short on time, please check video at the end of this article.

  1. Download the plugin

    Download the latest release of “Network Media Library” plugin from the GitHub repository – https://github.com/humanmade/network-media-library

  2. Upload plugin to network

    Navigate to your network admin dashboard and click on “Plugins” menu. Click on “Add New” and then “Upload Plugin” button. Click on “Choose file” button and then choose the zip file which you recently downloaded from above GitHub repository.

  3. Network activate plugin

    Once the plugin is installed, you need to “Network Activate” it. The plugin should either be installed as a mu-plugin or network activated. It’s a network plugin and therefore cannot be activated on individual sites on the network.

  4. Setting shared media library

    Site ID 2 is used by default as the central media library. You should configure your media library site ID via the filter hook network-media-library/site_id:

add_filter( 'network-media-library/site_id', function( $site_id ) {
return 123;
} );

That’s it once it is network activated you are all set to use shared media across your network site.

Video – shared media for WordPress Multisite

Leave a Reply