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 create your own file system, to better suit your website.
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 sub-folders for the years and months. It then adds your files to different folders based on the date when you uploaded them.
For example, an image that you uploaded in January 2023 will be stored in the /wp-content/uploads/2023/01/ folder.
This works well for most websites, but sometimes you may want to customize how WordPress stores media files.
For example, if you run a photography website then you might organize your images into topic, location, or event folders. Similarly, if you have a portfolio website then it may be easier to organize media uploads by type, client, or industry.
This can help you find the right file more easily, and may even improve image SEO by adding relevant keywords to your image file URLs.
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 create a new 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. This name will be added to the image URL, so you may be able to improve your WordPress SEO by adding relevant keywords.
After that, click on the ‘Create Folder’ button.
You can also create subfolders 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, click to select the folder where you want to store these items. 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
Sometimes, you may want to create a copy of a file in a new location. For example, if you manage a multi-author WordPress blog, then you may want to create your own version of another user’s image.
Since the original image remains in place, this can also help avoid confusing the image’s owner, which will improve the editorial workflow.
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. An SEO-friendly name can help optimize your images, so we recommend using keywords wherever possible.
To save the new name, click on the ‘Rename’ file button.
Just be aware that you can’t rename or move folders inside the Media Library Folders plugin. Instead, you’ll need to use a workaround where you create a new folder in the desired location, move all your files into it, and then delete the original 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.
Craig says
Can this be done without a plugin?
Thanks
Judith says
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?
thanks!
Antony says
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.
Tristan says
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
xavier says
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.
Admin