• Resolved deanbl

    (@deanbl)


    Hi,
    Using this plugin to bulk upload products on a site.

    Problem is, all the images upload to let’s say the uploads/2015/05 folder. This is fine except I have a TON of product images.

    Godaddy and most other hosts only allow 1000 files in each folder in the uploads. Right now I’m screwed because there’s 26,000 images all sitting in the may 2015 upload folder which is well over the limit.

    My Question: Any way to set up WP Import to import a max number of images to a certain directory folder and the ncreate a new folder once it reaches that number.

    Keep in mind, the images that are uploaded create 9-11 more of the same image with different sizes/thumbnails.

    I dont see a setting anywhere in the WP import that allows a max number of files to imported to a certain folder before creating a new one. I could be wrong, but it seems this would be a HUGE necessity for a bulk importer?

    Any help is appreciated.

    Thanks

    https://www.ads-software.com/plugins/wp-all-import/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author WP All Import

    (@wpallimport)

    All that WP All Import does is hand off images to WordPress. So if you want to change the structure of your uploads folder you’ll need to do so by customizing WordPress itself.

    I was able to find this plugin that you might find useful: https://www.ads-software.com/plugins/custom-upload-dir/

    Thread Starter deanbl

    (@deanbl)

    I already have that plugin. Works perfectly fine when uploading through the Media section.

    However, when running WP Import it refuses to acknowledge this plugin and simply uploads in the Month Folder, even when the custom upload plugin tells it to upload in the month/day folder it doesn’t. When items are manually uploaded via media they follow the direction just fine.

    Any other suggestions? Shouldn’t this be some kind of standard feature, I’d imagine i’m not the only one running into this issue.

    Thanks

    Plugin Author WP All Import

    (@wpallimport)

    This is a fairly common problem, but it’s not one that can really be addressed by WP All Import because WordPress itself should be handling the uploads folder structure.

    You’re right, for some reason the Custom Upload Dir plugin and WP All Import are not compatible with each other.

    I’ve use WordPress’ upload_dir filter to modify the image uploads directory. If you add this to your theme’s functions.php folder it should work for you:

    add_filter('upload_dir', 'add_date_to_upload_dir');
    
    function add_date_to_upload_dir( $param ) {
        $date = date('d');
        $dir = '/' . $date;
        $param['path'] = $param['path'] . $dir;
        $param['url'] = $param['url'] . $dir;
        return $param;
    }
    Thread Starter deanbl

    (@deanbl)

    Thanks but this didn’t work.

    It just ended up killing the revolution slider, adding an error message in the backend and within wp import cant pass step 1 or the page just goes blank.

    Plugin Author WP All Import

    (@wpallimport)

    I tested this on a debug installation with WP All Import and Revolution Slider and it works for both imported and manually uploaded images. Are you sure you added the code to your theme’s functions.php file? Are you using the latest version of WordPress?

    Changing your uploads folder is something you’ll need to do through WordPress, not WP All Import, and unfortunately customizing and debugging your WordPress installation is outside the scope of support we’re able to offer.

    I can confirm that the solution is working perfectly.
    you can change $date = date(‘d’); to $date = date(‘His’); if you have many many files to create more folders.

    Plugin Author WP All Import

    (@wpallimport)

    Great! Glad that’s working for you.

    Hi, is there anyone who tried this solution and worked too?
    As I am trying and nothing happens. I am not sure if there are some rules which should be met like URL permalinks structure…

    Yes, this solution working.
    I am using:
    $date = date(‘H-i’) besouse date(‘His’) make many empty folders.

    This solution is also working for me, however I would like to simply pass the date of the related post and use this to define the upload sub-directory.

    In short, any ideas how to pass either the publish date, or the date that is being used to define the publish date to the upload_dir filter:

    add_filter('upload_dir', 'add_date_to_upload_dir');
    function add_date_to_upload_dir( $param ) {
        $pub_date = publish_date_used_by_wp_all_import
        $post_date = strtotime($pub_date);
        $param['subdir'] = date('Y', $post_date ).'/'.date('m', $post_date);
        return $param;
    }
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Import Product Images To Different Upload Directory’ is closed to new replies.