Knowledge Base

Upload files to the media library via FTP

You have uploaded (a large amount of) files and their folder structure to the wp-content/uploads/ folder, but can’t find the files in your WordPress media library? We explain why and give you an alternative solution on how to upload folders properly.

Can folders and files be uploaded to the WordPress media library via FTP? No.

When you upload a file via FTP, your WordPress media library does not find the file. Upload via FTP to the wp-content/uploads/ folder is not supported by WordPress core. That’s why uploading folders to the directory doesn’t work even with Real Media Library.

WordPress is designed to work with an abstract implementation of a virtual file system. This is necessary to be able to e.g. outsource uploads to an Amazon S3 bucket (via plugins). WordPress must therefore register and process each file and cannot react to changes in specific physical directories.

Unfortunately, our Real Physical Media add-on doesn’t help here either, as it doesn’t implement bidirectional synchronization. The add-on only reflects the structure of the WordPress virtual file system into the wp-content/uplods/ folder, but not the content of the wp-content/uplods/ folder into the virtual file system.

There are plugins like Add From Server or Media from FTP which allow registering files uploaded via FTP into the virtual file system of WordPress afterwards. However, this is not a good idea as it can lead to unwanted side effects depending on what additional plugins (like Real Media Library) you use. Instead, you should always use the upload from the WordPress media library in the browser!

Solution: Upload files in folders via the media library

If you have uploaded the files to wp-content/uploads/ because you have already structured them into folders on your computer and don’t want to create folder after folder in your WordPress media library again, there is an alternative solution. You can upload folders with all their files and subfolders to your WordPress media library directly in your browser. In this article we explain how to do that: Upload files with folder structure

WordPress Plugins by devowl.io

Find helpful articles

Topics