Attachments

Images, videos, zip archives, and everything else in the WordPress media library are called attachments because initially they were attached to articles.

I had a chance to work with attachments a lot (especially since I developed the plugins like Multisite Network Media Library and Simple Media Library Folders), and below I’m sharing my experience with you.

Simple Media Library Folders

The plugin allows you to create folders in the WordPress media library and simplifies the process of management and organization of media files.

View plugin →

How to Manage Media Files in WordPress Multisite

In this tutorial, we will talk about ways of managing media files when you’re running a bunch of WordPress websites within a single WordPress multisite network. By the way, if you’re not 100% sure what a multisite network is, then you’re probably running multiple standalone sites.

Long story short, I will show you how the media files in multisite networks are handled by WordPress, how to set up centralized media management across your network, and also how to organize media with folders.

Multisite Shared Media Library

The plugin allows to convert a media library of a specific site of your multisite network into a network media library available across all the sites.

View plugin →

How to Create Folders in Your WordPress Media Library

I suppose one of the coolest things about WordPress is that it is quite simple by itself, out of the box, but it can be easily extended to almost any functionality you may need with the help of plugins and code snippets.

The same goes for the media library folders. Can you create folders in your WordPress media library? Out of the box – nope. But if you install a plugin for that – yes, of course.

Specifically, in this tutorial, I will show you how to create folders in the WordPress media library with my Simple Media Library Folders plugin.

How to Create Media Library Folders Without a Plugin

In this step-by-step tutorial, I’d like to guide you on how to create media library folders for your WordPress website, and we will not use any plugins for that.

The whole idea of publishing this guide came to me because of the questions of clients who are using my shared media library plugin for WordPress Multisite. Specifically, they were asking whether or not it supports third-party plugins for media library folders.

The thing is that there are no official WordPress plugins for creating media library folders. In another case, of course, I had added their support in the multisite shared media library.

First of all, I will show you how you can add a folder selection when uploading media files to the WordPress media library:

WordPress media library folders without plugins

Second, we will create a filter by a folder in the media library itself:

Filter media by folder in the WordPress media library.

If you’re not into coding, please take a look at my Simple Media Library Folders plugin.

The folders will look like this in that case:

Simple media library folders plugin for WordPress

I just wanted to show you that this option exists for you. From now on, we will only be talking about WordPress media library folders without plugins at all.

How to Upload an Image using WordPress REST API

In this tutorial, I am going to show three ways of how you can upload an image to a remote WordPress site using the REST API.

  • In the first way, we’re going to do it using WordPress HTTP API functions: wp_remote_post() or wp_remote_request(),
  • In the second way, I will show you how to do the same with cURL; why not?
  • Finally, in the third way, I will show you an example of how to upload media with the WordPress REST API using JavaScript.

The methods here are also used by my Simple WP Crossposting plugin, because, you know, when you crosspost a post to another site with the REST API, you definitely need to copy its images as well, at least the featured image.

All right, let’s just dive into it.

How to Move WordPress Media Library to a New Site

In this tutorial, I am going to discuss different ways of moving the WordPress media library to a new site – both for multisite installations and standalone WordPress sites.