How to create and maintain a custom folder structure in WordPress
How to create and maintain a custom folder structure in WordPress
If you are like me working for a long time with computers and dealing with a lot of files like documents, images, videos, etc. you want to create a somewhat logical folder structure to store them mainly for the purpose to quickly find them again. Surely there is a search feature but often that does not help in a folder view with many hundreds of files being listed, especially when these files do not have meaningful names. Also structuring files by topic or category is essential for content management purposes to quickly add or find content supporting media files.
Creating a folder structure in WordPress is quite limited as you have only two options. By default the media files are stored in the upload folder alternatively you can activate the “Organise my uploads into month- and year-based folders” function via Settings – Media, that will upload files to the year and its month sub-folder. This might be fairly suitable for a casual content creator as all files are listed in the Media library, but when you have a lot of content files and reuse them or even update them regularly it becomes quite a task to manage these.
Custom folder structure in WordPress
In bigger projects I want media files to be grouped in a custom folder structure by a certain category or topic to keep track and make it easier to manage all these files. As mentioned above by default WordPress stores uploaded media into the Upload folder which quickly will get crowded. Or in a year and month structure where you will loose track of topic related media files quickly over the course of many months or years.
If you manually upload it via FTP or cPanel WordPress will not offer those media files for you to use in a post or page as it does not recognise it through this method. Using FTP file managers or plugins like WP File Manager allow for all sorts of file management i.e. the upload of media files into the desired folder structure. But WordPress will not recognize and list those files in the Media library so you will have to employ other plugins to help with that.
One plugin I used for many years was Media Library Folders For WordPress which combines both the upload as well as registration of media files for the Media manager. But this plugin got frequently stuck in a configuration with WPML and Divi and crashed having to do a reset and even after that would not load properly, even so I was using the Pro version with support. It runs fine in other projects and configurations so you will have to always test out what works and what does not.
Luckily there was another way, uploading images via FTP or cPanel to the designated folders were I want them to be and get them registered by WordPress using the Media from FTP plugin. It “registers” all freshly uploaded and not yet listed files thereby making them visible in the Media library and therefore usable in pages and posts. A draw back here is that the Media from FTP plugin might rename the file name all-together depending if you had special characters in it which often is not ideal in regards SEO.
It seems once you have a fairly complex environment with i.e. a theme framework like Divi, WooCommerce, WPML, etc. and you add some other plugins to the mix things can get pear shaped very quickly and require many hours of research and troubleshooting. The more plugins in use the more complex it is to troubleshoot problems.
For this reason I generally stick to fairly well tested and established plugins as described here and more often than not am happy to pay for their service ensuring that their development and quality keeps up to scratch. Ensuring that you get good support in case you need it, which might be sooner than you think.
Please see our Domain Name and or Email Account and or Website Hosting and or Website Development and or eCommerce packages for pricing or
Simply contact us to discuss your requirements!
You might also like...
Solar Ovens, New Zealand
Solar Ovens, New Zealand is an e-Commerce website selling solar ovens and...
Cafe Racer Motor Joint New Zealand
Cafe Racer Motor Joint, New Zealand was an comprehensive e-Commerce,...
Virtual Tours services
After many months in the making, we are excited to announce a new service...