WP Manifestindependent plugin directory
manifest / utilities / fix-uploads-dir

Fix Upload Directories

Wordpress plugin to fix the UPLOADS constant breaking

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/cass-e-design/fix-uploads-dir/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Fix Upload Dir

Wordpress recently stopped using the UPLOADS constant (which usually lets you control which directory images/media are saved in) on my site, breaking all of my media not manually linked. This was designed as a quick and dirty fix using filters to modify the upload directory manually. I've since added a settings page.

Features

  • Uses the upload_dir filter to manually alter attachment URLs to the correct directory
  • Directory can be configured via the settings page

Getting Started

Installing

  • Download the git, and extract the folder to the /wp-content/plugins directory of your wordpress install.
  • Activate the plugin in the admin menu

    Configuration

  • Plugin settings page now allows you to set the directory from there
  • To disable the plugin, deactivate it.

Authors

Cass-E Design

License

This project is licensed under GPLv2 or later, because it's a wordpress plugin - see the LICENSE.md file for details.

Acknowledgements

I learned how to use the Wordpress Settings API from, among other sources: https://code.tutsplus.com/articles/create-wordpress-plugins-with-oop-techniques--net-20153