Support » Networking WordPress » wpmu_delete_blog not deleting blogs.dir folder

  • Resolved alsmith


    I’ve noticed even on a new install and new setup of an aditional site that wpmu_delete_blog is not deleting the folder for that blog inside the blogs.dir . In the case I am testing there are no files for the new site so I just assume that part is working.

    It is deletign the user and the tables for that user just not the folders within the blogs.dir like their blog_id and the files folder.

Viewing 11 replies - 1 through 11 (of 11 total)
  • sorry forgot to mention I am choosing Delete from within the Admin in multisite to delete a blog.

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Plugin Review Team Rep

    That’s correct. It doesn’t delete the blogs.dir.

    yeah, looking at the code the /files/ would need to be removed, it is just feleting the files and folders in the blog_id/files/ folder

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Plugin Review Team Rep

    You can delete blogs.dir/blog_id if you want to, but this is working as designed 🙂

    ok yes per the code it is working,

    Just wondering why when you say delete a blog it wants to leave empty folders for that blog id around.

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Plugin Review Team Rep

    It deletes all the content:

    1) The database tables
    2) The uploaded files.

    And yes, it leaves:
    1) The folder structure which can’t be reused anyway.

    Why? I would speculate that since it only writes to blogs.dir/#/files, it takes the responsible action of assuming you may have added files to blogs.dir/#/ (some of us do) and leave it the heck alone. I.E. it deletes what it makes, and nothing more.

    ok not trying to upset you, but when you create a new site it creates the blog_id folder and the folder named files. then when that site is used it stores their files and folders one of those two folders.

    As I see it then when you do a delete it prompts you for “You are about to delete the site /BLOGNAME/.
    If you say yes it then deletes everything associated with that site (unlike suspend).
    That blog_id is not reused nor would it be because the blog_id’s incremented.

    It just stands to reason then all the files along with all the info pertaining to that blog_id would then be removed.

    It is no big deal though.

    excuse me for jumping in your discussion, but i won’t be off-topic

    this part i haven’t fully understood..
    blogs.dir/#/ is just a deposit files ftp address, ain’t it?

    or you can address files in this folder with some URL?

    it is accsessable via URL /wp-contents/blogs.dir/BLOG_ID/files/filename.ext

    yeah, that’s the real address, no virtual one though…

    Ipstenu already pointed to me that this address is the root of the main site (as with robots.txt)… just wondering an alternate vision to this (wich would probably involve some ModRewrite)

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Plugin Review Team Rep

    Alternate to … what? To using blogs.dir? That’s already in the works, but the basic idea will remain the same.

    If you want to make a ticket on to ask that the BLOG_ID folder get deleted on site-deletion, maybe it’ll get picked up.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘wpmu_delete_blog not deleting blogs.dir folder’ is closed to new replies.