Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thank you for your question. I can imagine that using the conventional methods for deleting Media Library items would be quite tedious for the large number of items you must remove.

    However, it would take much more than a single “sql command line” to properly remove Media Library items. Each item has database entries in more than one database table, and there are often several “attached files” that must be deleted from the file system as well. There are WordPress functions you can call that do all of the required steps for this, and I strongly recommend you find a way to use them.

    Deleting 45,000 items will take quite a bit of processing time, and it is very likely you will exceed the time allowed for PHP script execution before all of the items can be deleted. If the script times out in the middle of deleting an item you will be left with some partial or damaged items in the Library.

    The most practical solution I can think of would be a small custom plugin that used the appropriate WordPress functions to delete items up to some limit, e.g., 100, 500 or 1,000 items at a time. If that would work for you I can put together an example you can use. Of course, it is up to you to make a database backup before you start and to take responsibility for what happens when the custom plugin is run.

    I will leave this topic unresolved until I hear back from you. Thanks for your interest in MLA.

    Thread Starter lododicesimo

    (@lododicesimo)

    hello
    thanks for reply
    yes can be ok for me… and i can ask my host provider to give me extra resources just for one day to do the script.

    i wait then
    very very thanks!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your patience. I have completed an example plugin that provides a tool for deleting unattached items from the Media Library.

    I have uploaded a new MLA Development Version dated 20151127 that contains the plugin in the /media-library-assistant/examples/mla-unattached-fixit.php.txt file. You can follow the instructions in the “MLA Gallery Filters and Actions (Hooks)” section of the /Settings/Media Library Assistant Documentation tab to access the example.

    I can also send you a copy if that would be easier for you to use. You can give me your contact information using the Contact Us page at the FTJ web site:

    Fair Trade Judaica/Contact Us

    Do not post your e-mail address in the forum; personal details in a public forum violates WordPress guidelines. If you have trouble accessing the FTJ site, post a note here with your country of origin and I can temporarily unblock it.

    Thanks for your help with this new tool and for your interest in the plugin.

    Thread Starter lododicesimo

    (@lododicesimo)

    Thanks i did now a mail to contact pace.
    Thanks.

    Matteo Bruno

    Plugin Author David Lingren

    (@dglingren)

    Thanks for contacting me and working with me offline to test the mla-unattached-fixit.php example plugin. I am happy to hear it is working for you.

    I will mark this topic resolved when the example plugin goes out with the next MLA version.

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA version 2.20, which includes the mla-unattached-fixit.php example plugin,

    I am marking this topic resolved. Thanks for working with me on this new MLA example plugin.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Bulk delete Unattached images/media’ is closed to new replies.