• Resolved pietpompies

    (@pietpompies)


    Hi Guys, My media doesn’t sit in the default folder. From my custom theme function file ‘upload_path’ can be picked by user.

    As soon as MLP is activated it gives a error that folder destination is incorrect because the check does not OK anything outside wp-contents/uploads.

    Do you have a way to make this work?
    Thanks

    custom folder code:

    if(get_option('upload_path')=='wp-content/uploads' || get_option('upload_path')==null) {
    update_option('upload_path',WP_CONTENT_DIR.'/uploads');
    }

    https://wordpress.org/plugins/media-library-plus/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author AlanP57

    (@alanp57)

    I wonder if it depends on when you set up the new location for media files. I created a new WordPress site and set the value of upload_path to wp-content/media. Then I added some images. Prior to this there were no items in the media library. Then I installed Media Library Plus and it had no problems with finding and accessing the files in the media folder.

    WordPress has a built in method for redefining were media is uploaded by using

    define( 'UPLOADS', 'relative path to your media folder' );

    in wp-config.php. We support this feature.
    See https://codex.wordpress.org/Editing_wp-config.php#Moving_uploads_folder

    If some files were uploaded to the uploads folder and then others were added to a different location then MLP would not be able to handle that.

    Thread Starter pietpompies

    (@pietpompies)

    Thank you very much Alan, your approach resolved the issue.

    I used the code in wp-config.php to successfully define my media folder relative to install, even though it is not in the wp folders at all.

    Ran the plugin reset and wp-sweep and MLP picked up all the folders and existing images.

    Only down-side, this approach doesn’t give end-user the quick setting page fields to define the media folders. – we’ll investigate that separately, thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘make work with custom media folder (NOT wp-contents/uploads)’ is closed to new replies.