Custom Upload Dir

Automatically sorts uploaded files according to your site structure.

Author:Ulf Benjaminsson (profile at wordpress.org)
WordPress version required:3.9
WordPress version tested:6.0.1
Plugin version:3.4.6
Added to WordPress repository:04-12-2007
Last updated:26-07-2022
Rating, %:86
Rated by:23
Plugin URI:http://wordpress.org/extend/plugins/custom-up...
Total downloads:93 971
Active installs:7 000+
plugin download
Click to start download

WordPress allow you to put uploads in year- and month-based folders. Custom Upload Dir is more flexible. You can construct paths from variables like post title, category, post author, post date and many more.

I created Custom Upload Dir ensure my file system is always mirroring the site structure. This ensures I can always find files manually when needed. It also simplifies backups and platform migrations.

//Ulf Benjaminsson

Changelog v. 3.4.6 (2020-07-17)

  1. fixed a null dereference error. (thanks, defotoverij!)

Changelog v. 3.4.5 (2020-05-05)

  1. added french translation (thanks, bibi699depreau!)

Changelog v. 3.4.4 (2019-03-24)

  1. Fixed a few PHP warnings
  2. Removed the %permalink% template as it broke uploads to drafts.

Changelog v. 3.4.3.2 (2019-03-24)

  1. Added support for the Gutenberg editor.

Changelog v. 3.4.2 (2015-03-16)

  1. Added filter ‘cud_generate_path’ so you can easily adjust the path with any variable you want.
  2. Added %mime_type% to sort files by mime type
  3. Added %author_role% to sort files by author role.
  4. Coming: support for per-post-type settings. Eg: every post type can have their own rules for where to place uploads. Currently missing the admin interface. If you feel like helping out, let me know.

Changelog v. 3.4 (2013-02-09)

  1. Added %file_ext% to sort by file type
  2. Added tentative support for uploads from WordPress apps.
  3. Removed setting for “Base upload folder” as WP core no longer exposes this
  4. Cleared out some PHP error on the admin page
  5. Fixed leaking CSS on admin page

Changelog v. 3.3 (2011-12-18)

  1. Support for WordPress 3.3
  2. Support for tags and categories
  3. Support for custom taxonomies
  4. Added %current_user%, %permalink%
  5. Added all permalink tags
  6. Added test-function to admin page

Older changelogs moved here.

Additional Info

Copyright (C) 2007-2019 Ulf Benjaminsson

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Screenshots
FAQ
ChangeLog