Media Organiser

Description

This plugin allows attachments to be organised into folders on the server.

Attachments are physically moved into folders, and all references to them in pages and posts are updated accordingly.

Media Organiser was originally forked from version 1.4.2 of Media File Manager by Atsushi Ueda, and has been largely rewritten since then. It does not yet have the ‘media selector’ function of Media File Manager — in fact, the ‘new’ interface to choosing media is so poorly documented that I can’t work out how to use it. Any ideas?

There is also a tool on the plugin’s Settings page which allows attachments
whose files are missing from the file system to be tidied up.

Requirements

  • MySQL database engine that does transactions, otherwise things will get out of whack of something goes wrong when renaming files. Information on changing engines can be found on easyengine.io. The tables that are affected are wp_posts and wp_postmeta.

Acknowledgements

Icons adapted from github.com/iconic/open-iconic/.

Known issues

  • May not work on sites hosted on a Windows server — haven’t checked the use of directory separators yet.
  • Does database transactions — so requires a database engine that can do commit/rollback, such as InnoDB.
  • Does its best to make changes atomic, but things could go wrong if something changes in the middle of renaming files.
  • No internationalization (yet).
  • Doesn’t check if posts are already locked for editing before making changes to them, so it’s best to move and rename attachments when you’re sure that no-one else is working on any posts or pages that use those attachments.

Installation

Install the plugin in the usual way and activate it.

Administrators should get permission to use the plug-in automatically. Go to Settings / Media Organiser to give other roles permission to use it if required.

Contributors & Developers

“Media Organiser” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Media Organiser” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

0.1.6

  • Fixed an obscure bug by giving global variables even longer names. I really
    need to avoid globals.
  • Tested with WordPress 5.0.3.

0.1.5

  • Added a feature on the Settings pages to allow any post attachments with
    missing files to be deleted.

0.1.4

  • Tested with WordPress 5.0.1.

0.1.3

  • Tested with WordPress 4.9.1.

0.1.2

  • Added code to cope with duplicated secondary files.
  • Documented requirement for transaction-capable database engine.
  • Automatically grant capabilities to administrators.
  • Better CSS for small screens.

0.1.1

  • Disable checkboxes if moving is not possible (i.e. name clash)
  • Improvements to CSS and HTML
  • Tweaks to documentation.

0.1.0

  • Media Organiser admin page largely reworked. Media Selector section is not yet done.
  • Meets current WordPress standards: uploaded to WordPress Plugin Directory.

0.0.9

  • Forked from Media File Manager 1.4.2