0

I have additional folder (images/) in wp-content/uploads/ directory to store theme images (I heard it is good practice to place them in upload directory) and I want Media Library to list this files because I might need to reuse them somewhere else. Is there a way to tell Media Library to look for files in whole uploads directory (or manually add directories to look in) maybe using functions.php?

0

The Media library doesn't directly pull from the uploads folder. It reads in Attachments, which place their attached media in the uploads folder. If you want to access them through WordPress, you will need to upload them as Attachments.

  • Great. I have actually found a plugin that can import files from any folder into database which is a great work around this problem. I wouldn't know about this without your answer. Thanks. And this is the plugin: wordpress.org/plugins/add-from-server – Juraj.Lorinc Sep 9 '15 at 14:42
-1

You can customize the upload location in the wp-config.php file. Just before the line that goes

require_once(ABSPATH.’wp-settings.php’);

add define('UPLOADS', 'path/to/new/folder');.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.