The „External files for media library“ plugin has evolved over time from a small application into a comprehensive tool. It can help to solve many different use cases in connection with files in WordPress. Here I explain the concept behind it to show the possibilities it can offer for many WordPress-based projects.
The origin
To understand the concept, you need to understand something of the history of its creation. A few years ago, I had the plugin Download list with icons entwickelt. Dieses ermöglicht die Ausgabe von Dateien in einer komfortablen Liste im Block Editor. Man ordnet Dateien aus der Mediathek dem Block zu und zeigt diese dann an.
Die Anwender dieses Plugins sind interessanterweise vielfach im wissenschaftlichen Bereich tätig. Hier geht es z.B. um PDF-basierte Dokumentationen von Veröffentlichungen. Alles kein Problem mit dem Plugin. Aber wissenschaftliche Institutionen speichern solche Dokumente gerne zentral an einer Stelle um sie ggfs. auch aktualisieren und gleichzeitig auf dem Weg verteilen zu können. Daraus ergab sich eine für mich völlig neue Anforderung:
Users of my plugin needed a way to add URLs to the download list block 😒
I first tried with ReactReact JavaScript program library for the creation of web-based user interfaces to create a way of inserting this directly into the block. However, I failed, mainly due to the user interface, which was simply not suitable for this.
The basic concept
First of all, I looked around to see if there was a plugin somewhere in the WordPress plugin repository for this very purpose. Interestingly, I found a few small ones, but they were extremely outdated. For example, they enabled the download of a file via FTPFTP File Transfer Protocol in the media library. It wasn't quite what I was looking for. And the way these plugins were programmed didn't meet my quality standards or those of the WordPress repository, which has changed for the better in recent times.
So a new plugin was created: External files in the media library. Ich erweiterte mit diesem die Mediathek um die Möglichkeit URLs für Dateien anzugeben, die dann im Projekt wie normale Medien-Dateien verwendet werden konnten.
Initially, I simply downloaded the files from the URLs provided and saved them in the media library. However, this did not correspond to the goal described above of leaving the files external. So I looked at what I could do to save external files as such in the media library - and it worked surprisingly well. So I came up with my basic concept for the plugin:
Store the URL of external files in the media library, not the file itself.
Why URL-based?
Dateien im Internet sind alle mit einer URL referenziert. Diese kann direkt erreichbar oder mit irgendeinem Zugriffsschutz versehen sein. Aber sie haben alle URLs.
Warum nicht den „Einbetten“ Block verwenden?
This allows you to integrate wonderful external content into your own website. But it does not enable the linking in my block for the download list.
The evolution of the plugin
So I had the actual goal of adding external URLs to the plugin Download list with icons verwenden zu können, durchaus erreicht. Klar, ein weiteres Plugin was man installieren müsste – aber wer es braucht wird es nutzen. Und so begann ich damit es Stück für Stück zu erweitern, meist aus eigenem Wunsch heraus, da ich es für mich als technische Herausforderung ansehe. Inzwischen übersteigt es weit das ursprüngliche Ansinnen, eine Unterstützung für mein anderes Plugin zu sein – beide sind jedoch weiterhin miteinander kompatibel.
Protocols
URLs naturally also use different protocols. HTTPHTTP Hypertext Transfer Protocol is familiar to everyone, and FTP still means something to some. There are also HTTPSHTTPS Hypertext Transfer Protocol Secure, SFTPSFTP Secure File Transfer Protocol, FTPSFTPS Method for encrypting the File Transfer Protocol (FTP), SSH and others (even something like Gopher). Most of them are access-protected, some are only optional. So I started to support these protocols in the plugin.
What is particularly helpful in this development is that WordPress itself already has everything you need. With the WP_Filesystem() based objects, you can easily query a wide variety of protocols. Some of them, of course, set corresponding PHPPHP PHP is a scripting language with a syntax based on C and Perl, which is mainly used to create dynamic websites or web applications. https://de.wikipedia.org/wiki/PHP-modules. But I didn't have to reinvent the wheel.
And so support for many different protocols was quickly added to the URLs.
File types
WordPress itself only allows the upload of certain file types during a fresh installation. PDF, JPG, PNG and others are commonplace for most users. I didn't want to extend these rules with my plugin, as External files for the media library is intended for external files and not for managing file types - that's why there's other very good plugins. So my plugin accesses this list from WordPress (which other plugins can extend) to check whether an external file is permitted. In the plugin settings, you can at least choose which format WordPress supports for external files.
Services
Up to this point, the plugin has worked extremely satisfactorily, I began to think bigger. Was verwenden WordPress-Anwender zum Verwalten ihrer Dateien abseits von WordPress, die sie dann aber in ihr Projekt integrieren möchten? Wie könnte ich denen die Arbeit erleichtern? Ich kam auf verschiedenste Dienstleister, die es ermöglichen Dateien zu verwalten. Und wie greift man von extern auf diese zu? Ja, per API.
So I started, piece by piece, to find service providers like DropboxDropbox Online data storage, Google Drive, Google Cloud Storage and AWS S3 into the plugin. Again, these are URLs of files that I received via API - so no problem for the basic functions of „External files for the media library“. The main effort in the implementation consisted of getting to know the respective API and connecting it.
Da ich selbst diese Plattformen selten bis gar nicht nutze, betrat ich für mich selbst Neuland – aber genau das fasziniert mich an der IT: die Möglichkeiten, die man hat ohne von ihnen zu wissen, und sie dann kennenzulernen.
Convenient file views with React
Everything I have described up to this point involves activities in the background. Objects and tasks are created in the plugin that have no visual output for the user in the WordPress backend. But I also had to provide the user with an interface for the services so that they can see what files are there and select from them.
This resulted in a React-based tool called „Easy Directory Listing for WordPress“ what with GitHubGitHub Software development platform as composercomposer application-oriented package manager for PHP package is available. This is used by my plugin to handle all file listings in the backend. It provides a tree on the left and the file list on the right. There are also options for importing and a few other things.

Compatibility with other plugins
Another major shortcoming of the media library in WordPress is that you can't organize files there. They are just there without categorization and classification. This can be solved with various plugins:
- https://de.wordpress.org/plugins/filebird/
- https://de.wordpress.org/plugins/ifolders/
- https://de.wordpress.org/plugins/folders/
- https://de.wordpress.org/plugins/real-media-library-lite/
.. nur um einige zu nennen, es gibt noch weit mehr. Da mir bewusst ist, dass Anwender meines Plugins möglicherweise die externen Dateien auch einordnen möchten, schuf ich also eine Kompatibilität zu sehr vielen von diesen Drittanbieter-Plugins. Dadurch kann man beim Import festlegen, dass und wo man eine Datei einordnen möchte, wenn man ein Plugin für Verzeichnisse in der Mediathek verwendet und „Externe Dateien in der Mediathek“ dafür eine Unterstützung mitbringt.
In addition, there is also compatibility with WooCommerce with its CSV-based import and various other plugins that handle files in the media library.
Synchronization
After the manual method worked so well for the various sources, I also started to consider an automatic method. The use case could be, for example, that you want to update a gallery automatically - simply because there is a new file in an external source. The plugin can now also do this and offers it for almost all external sources.
Exporting files
Und da ich schon bei Dateihandling bin: bisher konnte das Plugin ja nur Dateien in die Mediathek holen. Was aber, wenn man auch mal eine Datei aus der Mediathek extern speichern möchte? Der klassische Fall vom Auslagern von Dateien (aka Offloading). Da ich schon die Verbindung zu den Quellen hatte, war es ein einfaches nun auch den Export von Dateien dorthin zu ermöglichen.
Lizenzierung als Herausforderung
Anfang 2026 bat ich einige Freunde um einen Test der nächsten Inkarnation des Plugins. Ich hatte bis dahin 7 Monate an einer Aktualisierung gearbeitet und wollte es endlich abschließen. Die Rückmeldungen waren zwiegespalten. Die einen waren überwältigt von den Möglichkeiten und wussten nicht, wo sie überhaupt was testen sollten. Andere begrüßten die vielen gut formulierten Hinweise (zu dem Zeitpunkt alles in englisch) zur Handhabung von Funktionen.
Daraufhin wollte ich das Plugin in Version 5.0.0 direkt veröffentlichen. Das Package war gigantische 6.8 MB groß geworden und enthielt alle benötigten Bibliotheken. Dadurch ergaben sich 2 Probleme, die mir vorher gar nicht bewusst gewesen sind:
- Das Update per SVN ins WordPress Repository hochzuladen, geht nicht, da nach rund einer Stunde ein Timeout kommt. Diesen kann man auch nicht umgehen – er ist fest hinterlegt. Wie ich mitbekam war daran vor Jahren auch schonmal das Gutenberg-Team gescheitert.
- Dadurch, dass ich mir die Dateien des Plugins auf Grund ihrer Menge nochmal anschauen musste, fiel mir auf, dass einige der verwendeten Bibliotheken gar nicht GPL-kompatibel sind.
Die Lösung war naheliegend: ich teilte das Plugin auf. Die nicht-GPL-kompatiblen Bibliotheken wanderten in eigene Plugins, die ich auf GitHub hosten konnte. Darunter fiel auch jegliche Unterstützung für AWS S3-kompatible Cloud-Speicher. Aber daraus ergaben sich direkt einige Vorteile:
- Die Funktionen des Plugins sind nicht mehr so erschlagend, wie von einigen Testern gemeldet.
- Das Package war wesentlich kleiner geworden und wird so auch ins SVN veröffentlicht werden können.
- Ich gehe kein Risiko einer Mischung mit nicht-GPL-kompatiblen Bibliotheken ein, die zu einer Sperrung des Plugins im Repository führen könnten.
- Ich kann die Funktionen für einzelne externe Quellen in eigene Plugins kapseln, was es für mich übersichtlicher und auch wartbarer macht.
- Andere Entwickler können ihre eigenen Plugins beisteuern um externe Quellen für mein Plugin bereitzustellen.
Nach einigen Wochen waren die Plugins nun fertig für den Einsatz. Das Plugin hatte sich somit nochmals gewandelt, aber aus meiner Sicht zu seinem Vorteil.
In conclusion
Mein oben formuliertes Konzept hat sich durch die vielfältigen Möglichkeiten, die das Plugin inzwischen bietet, gewandelt. Nach über 3 Jahren Entwicklung würde ich es Anfang 2026 folgendermaßen umreißen:
Optimization of the management of files in the media library with external sources.

Leave a Reply