[wp-trac] [WordPress Trac] #43162: Deleting a site from a multisite network leaves orphaned database tables and files
WordPress Trac
noreply at wordpress.org
Fri Jan 26 19:12:12 UTC 2018
#43162: Deleting a site from a multisite network leaves orphaned database tables
and files
--------------------------------+------------------------------
Reporter: bluep92877 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version: 3.0
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses: multisite
--------------------------------+------------------------------
Changes (by johnjamesjacoby):
* keywords: => 2nd-opinion
* version: 4.9.2 => 3.0
* type: defect (bug) => enhancement
Comment:
Hey @bluep92877, thanks for opening this issue up, and congrats on your
first ticket here on WordPress Trac.
I think you've brought up good points, and these are all areas where
clarification and improvements are necessary.
Re: #30673, I agree that "uninstall" in the context of a multisite
installation implies that all relevant data is removed from all sites,
which seems heavy handed under most circumstances, though I can imagine
why that might be necessary.
Plugins can (and should) use the `wpmu_drop_tables` filter to add their
custom database tables to the array of tables that are dropped when a site
is deleted.
Database tables and Uploads are both pretty sacred, IMO. If we are
deleting one, we can safely delete the other. Dropping large database
tables can be costly on the database server in a similar fashion to
unlinking a directory. It looks like `wpmu_delete_blog()` does try to
delete both the database tables and the uploads directory. Maybe something
is wrong with the `$drop` logic, or something else is in the way?
That said, permanent deletion is so scary; I'm always hesitant to give
anyone that power (even super admins.) 1 click to ruin it all is a lot of
responsibility, even 2 or 3 clicks with warning signs and notices.
----
I think erring on the side of caution here is OK. Only delete stuff if we
are 100% certain it's OK to do so, and leave it untouched if there is any
doubt. This might result in orphaned tables or files, but I think that's
better than blindly deleting them without explicit say-so.
I guess, now that I type this, we could (should) do a quick check on that
`delete-site` confirmation screen that says "Here are all of the database
tables this site has, and it contains 2GB of uploads. Are you sure you
want to delete all of this stuff?"
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43162#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list