• Hi,

    I try this plugin but i have 100.000+ images on my database.

    The plugins break the memory_limit set to 512M, when we try to get all the image.

    To avoid this problem, i just edit and add the year (2018) in the biggest request.

    And set it to 2018 only.

    It’s work for me ;).

    Paul

    File : resmushit.class.php

    $queryAllPictures = $wpdb->prepare(
    “select
    $wpdb->posts.ID as ID,
    $wpdb->posts.guid as guid,
    $wpdb->postmeta.meta_value as file_meta
    from $wpdb->posts
    inner join $wpdb->postmeta on $wpdb->posts.ID = $wpdb->postmeta.post_id and $wpdb->postmeta.meta_key = %s
    where $wpdb->posts.post_type = %s
    and $wpdb->posts.post_mime_type like %s
    AND YEAR(post_date) = ‘2018’
    and ($wpdb->posts.post_mime_type = ‘image/jpeg’ OR $wpdb->posts.post_mime_type = ‘image/gif’ OR $wpdb->posts.post_mime_type = ‘image/png’)”,
    array(‘_wp_attachment_metadata’,’attachment’, ‘image%’)
    );

    • This topic was modified 6 years, 4 months ago by ansaypaul.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Error : Memory_limit reached’ is closed to new replies.