Support » Plugin: Media Cleaner - Clean & Optimize Space » Multisite support?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi @bidiesman,

    It works with multisite 🙂 However, it will need to run independently on every single website.

    Thread Starter bidiesman

    (@bidiesman)

    Thank you!
    I’m really excited to try this tool.
    last question I did turn on media trash and 7 days before permanent delete for media.
    define( ‘MEDIA_TRASH’, true );

    this mean that picture stay on the server (wp-content/uploads/…) at the exact same place for 7 more days.
    but database link is update in order to “break” the link to access that picture and add an extra status field like “trash” is set?

    is it that way this media_trash is working?

    Thanks a lot for your feedback !

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hello,

    Where did you set this to 7 days? The trash is normally not emptied automatically neither by WordPress nor Media Cleaner.

    If another plugin actually deletes the entries (posts, pages, media…) after a few days in the trash, it would definitely also miss all the actual files 🙂

    Also, when Media Cleaner deletes a file, it marks the Media entry as deleted (so it doesn’t appear anywhere) and the file is moved to a trash directory. The file is therefore not accessible anymore (which allows you to test your website without it).

    Cheers 🙂

    Thread Starter bidiesman

    (@bidiesman)

    Hi Jordy,
    with the following extra line in wp-config:
    define( ‘EMPTY_TRASH_DAYS’, ‘7’ );
    you can automatically empty media trash.

    I try to understand:
    -how will wp_post and wp_postmeta handle the information.

    What I believe it’s happening with the following setup:
    define( ‘MEDIA_TRASH’, true );
    define( ‘EMPTY_TRASH_DAYS’, ‘7’ );

    if a media is deleted it will appear to trash in wp-admin media.
    Therefore I guess postmeta has a field updated with that “trash” information.
    Still I believe the media file is still at the same place?
    or is it also moved in another directory in wp-content/uploads/trash or anything else??

    After 7 days,I guess the media is permanently deleted and post and post meta entry deleted?

    About your plugin:
    “when Media Cleaner deletes a file, it marks the Media entry as deleted (so it doesn’t appear anywhere) and the file is moved to a trash directory. The file is therefore not accessible anymore (which allows you to test your website without it).”

    So your plugin moved the media and update the postmeta in order to test the website. And after that you have an option to permanently delete and the file and the entry in database?

    I have a last question:
    Your plugin is giving me a timeout after 30 second I started the scan. I did try to change the delay to 3000ms.
    I noticed you have a empty request test. should I base that delay value or another value on that empty request test value to avoid timeout?

    Thanks a lot for your support,

    Jérôme

    Plugin Author Jordy Meow

    (@tigroumeow)

    In fact, are you sure that the EMPTY_TRASH_DAYS value also works with the entries of the Media Library? Have you tested it? For me, it only affects the posts (and the other post types). If it empties the trash of the Media Library, then the entry will definitely be removed but not the files. The only issue will be that Media Cleaner will not be able to retrieve this entry anymore. I have never heard issues about this however, so my guess is that that value doesn’t affect it.

    What my plugin does:
    – it marks the media entry as deleted (but not permanently yet)
    – it moves the files to a special ‘trash’ directory

    Then of course, when you “Empty the Trash”, the entry gets deleted permanently and the files deleted from the trash as well.

    The Empty Request Test is just a request send to your server which does nothing at all. It’s not related to many plugin, only your install. If that number is a bit high, like more than 2-3 seconds, it’s quite slow. Good servers are below 1s.

    Thread Starter bidiesman

    (@bidiesman)

    Hi Jordy,
    You are right,
    https://codex.wordpress.org/Trash_status#EMPTY_TRASH_DAYS_option
    Following documentation: it only applies to posts,pages,comments.
    Second of all, it seems that without setting up this value, the default value is set to 30 days.

    If you answer I understand better the behaviour of your plugin. Still what’s the “trash” directory you are using? wp-content/…../trash?

    About using your plugin. I still can’t make it happen.
    when I start the scan, your plugin is “preparing posts” 5 posts per 5. and I get a 504 time out gateway. it sounds like an incompatibility with a plugin or a setup.
    I will send you an email about it. and if we find out I will post the answer here.

    Thank you !

    Plugin Author Jordy Meow

    (@tigroumeow)

    If you answer I understand better the behaviour of your plugin. Still what’s the “trash” directory you are using? wp-content/…../trash?

    This is the internal trash to Media Cleaner. When you delete files, the files are actually moved there temporarily (until you empty that trash). That allows you to test your website before removing them permanently.

    Timeout is tricky to manage, that’s not really because of the plugin, but rather because your install has issues to run longer requests and operations. Please have a look about it here: https://meowapps.com/media-cleaner-debug-issues/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Multisite support?’ is closed to new replies.