• Hi,

    Does your plugin also delete site uploads from /wp-content/uploads/sites/[site_id]?

    When you delete a site from the network admin dashboard, the uploads from these site are note deleted. In our current demo site we have more than 10 GB of old unused uploads which we have to delete manually.

    It would be great if your plugin did that automatically.

    Thanks.

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

    (@mikeyhoward1977)

    Hi @swoboda,

    This has been a talking point for a while now. We use built-in WordPress functions to delete sites. Your question is also discussed here.

    Per my edited note below, WordPress should delete uploaded files. So long as it can determine the path to the uploads folder

    • This reply was modified 4 years, 1 month ago by Michael.
    • This reply was modified 4 years, 1 month ago by Michael.
    Plugin Author Michael

    (@mikeyhoward1977)

    To correct myself and be more accurate, WordPress does delete the files on site deletion. At least it tries to. It seems to be a little hit and miss but the code to delete all the directories and files does exist. Therefore our plugin will also delete files

    I just created a test demo site with our plugin, uploaded a file and then had the plugin delete the site once it had expired. The file I uploaded was also removed.

    If you have a large number of files to delete, then this is a costly function to run so it could be that WordPress does not delete the files in those situations. We’ll look into it a little more

    • This reply was modified 4 years, 1 month ago by Michael.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Delete uploads’ is closed to new replies.