WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wpmu_delete_blog not deleting blogs.dir folder (12 posts)

  1. alsmith
    Member
    Posted 2 years ago #

    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.

  2. alsmith
    Member
    Posted 2 years ago #

    sorry forgot to mention I am choosing Delete from within the Admin in multisite to delete a blog.

  3. That's correct. It doesn't delete the blogs.dir.

  4. alsmith
    Member
    Posted 2 years ago #

    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

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

  6. alsmith
    Member
    Posted 2 years ago #

    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.

  7. 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.

  8. alsmith
    Member
    Posted 2 years ago #

    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.

  9. brasofilo
    Member
    Posted 2 years ago #

    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?

  10. alsmith
    Member
    Posted 2 years ago #

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

  11. brasofilo
    Member
    Posted 2 years ago #

    yeah, that's the real address, no virtual one though...
    i.e., BLOG_NAME.domain.com/filename.ext

    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)

  12. 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 trac.wordpress.org to ask that the BLOG_ID folder get deleted on site-deletion, maybe it'll get picked up.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.