Do you want to organize WordPress files in the media library folders?
By default, WordPress automatically creates folders for different years and months, and then adds each media file to the right folder based on its upload date. However, you might want to upload your media files to different folders.
In this article, we’ll show you how to organize WordPress media files into custom folders.
Why Organize Your Files in Media Library Folders?
Normally, WordPress stores all your images and other media files in a /wp-content/uploads/ folder. Inside this folder, WordPress creates different sub-folders for the years and months, and then adds your files to these folders based on when you upload them.
For example, an image that you uploaded in January 2023 will be stored in the /wp-content/uploads/2024/01/ folder.
This works well for most websites. However, some users may want to customize how WordPress stores media files.
For example, if you run a photography website then you might want to organize your images into topic, location, or event folders. Similarly, if you have a portfolio website then you might organize media uploads by type, client, or industry.
This will help you find the right file more easily. It can also improve image SEO by adding relevant keywords to your image file URLs. For example, instead of uploads/2024/01/conference.png you might have a URL structure such as uploads/events/marketing/conference.png
Having said that, let’s take a look at how to easily create folders to organize your WordPress media files.
How to Organize Your WordPress Files in Media Library Folders
The easiest way to create custom media folders in WordPress is by using Media Library Folders. This free plugin allows you to create folders and move, delete, and rename files directly in the WordPress dashboard.
This is much easier than connecting to your server using an FTP client.
First, you need to install and activate the Media Library Folders plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.
Upon activation, go to Media Library Folders in the WordPress dashboard. You’ll now see all the folders inside your WordPress upload directory.
From here, you can create new folders and add files to them. You can also move, copy, rename, or delete files on your WordPress website.
To start, we’re going to create some new folders and add images to them.
To create a folder, simply click the ‘Add Folder’ icon, which looks like a small folder with an ‘+’ symbol on it.
In the popup, type in a name for the folder. You can’t use spaces in folder names, so you’ll need to separate words using a hyphen or underscore.
After that, click on the ‘Create Folder’ button.
You can also create subfolders inside folders by selecting the parent folder towards the left of the screen.
Then, go ahead and click on the ‘Add Folder’ icon.
You can now give the subfolder a name and click on ‘Create Folder.’
To see all your subfolders, simply click on the small white arrow next to any parent folder.
To add files, simply click to select the folder and then click on the ‘Upload Files’ icon, which has an upwards arrow.
You can now go ahead and upload as many files as you want.
After a few moments, you’ll see a preview of all the files and their filenames on your WordPress blog.
You can now add these images to your posts or pages just like any other files that you’ve uploaded to the media library.
Moving and Copying Your Files in Media Library Folders
Sometimes you may need to move an existing media file into a different folder. With this plugin, you can either move the original file or create a copy in the new location.
Moving an Image to a New Folder in the Media Library
To move an image or any other file, simply click on the ‘Move’ icon so that it turns blue. You’ll also see the following message: ‘Drag and drop is set for moving files.’
Now, find the image that you want to move and drag it to the new location.
Just before you release the file, the destination folder should be highlighted in blue. When you see this highlight, drop the file to move it to the new location.
Copying an Image to a Different Folder in the Media Library
If you prefer to copy the image then make sure you click on the ‘Copy’ icon so that it turns blue. It will also show the message: ‘Drag and drop is set for copying files.’
Now, find the image that you want to copy and drag it into the new destination folder. Just before releasing the file, make sure the folder is highlighted in blue.
Media Library Folders will now create a copy and add it to the new folder while keeping the original file in place.
Renaming Files and Folders in Media Library Folders
You can also change a file’s name using the Media Library Folders plugin. First, find the file that you want to change and click the checkbox below it. Next, click the ‘Rename a File’ button, which looks like a small pencil.
In the popup, type in the filename that you want to use. Image filenames have a small impact on your WordPress SEO, so we recommend using keywords wherever possible.
To save the new name, click on the ‘Rename’ file button.
You can’t rename or move folders inside the Media Library Folders plugin. Instead, you’ll need to create a new folder in the desired location, move all your files into it, and then delete the old folder.
When you’re ready to delete the folder, right-click on it and then select ‘Delete this folder?’
You’ll now see a message asking if you really want to delete the folder. To go ahead and permanently remove it, simply click on ‘OK.’
Sometimes, you may see the message ‘This folder is not empty and could not be deleted’ even though the folder looks empty. This usually happens because WordPress automatically creates additional versions of your images, which you still need to delete.
To see these images, simply click on the ‘Sync folder contents’ button.
After this, you should see all the duplicate images. Simply delete these copies following the same process described above, and then try deleting the folder again.
For more troubleshooting tips, see our guide on how to fix common image issues.
We hope this article helped you learn how to organize WordPress files in media library folders. You might also want to see our guide on how to create a custom Instagram photo feed in WordPress or see our expert pick of the best SEO plugins and tools that you should use.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Can this be done without a plugin?
Hi, Thanks for the article, it’s something that bothered me since a long time without really realizing that it was a problem
My only question: if using this plugin does it physically create those folders in the backend and move the images to the correct location? And if so, does it then automatically relink my website pages where those images are used?
I tried it, and No, it’s just on the frontend for easy access and order.
Sorta like those “Folders” plugins that let you organize posts and other stuff.
You can manually move the files in your CPANEL, but it causes broken image links on your site, so a plugin is the only usable option that I know of.
Hi, the media folder access can be restricted by WordPress User or WordPress user role in the plugin WP Media Folder. Admin would still have access to all the media. This is pretty convenient for website with multiple editors
is there a convenient way so that each user get access to a separate folder in the media gallery ?
WPBeginner Support says
We would recommend reaching out to the plugin’s support to see if that can be an option in the future.