-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wp site delete leaves custom tables in DB #452
Comments
Thanks for the report, @JanThiel Few questions:
If WordPress core doesn't delete the tables by default, I don't think we'll want the default behavior for |
This command uses the WordPress-provided Edit: For completeness, |
@swissspidy @danielbachhuber Thanks for your quick response :-) Sounds like a reasonable possibility that some plugins are simply doing it wrong. Still the remaining tables are from quite common plugins:
Steps to reproduce: I will open a ticket with Gravity Forms to ask for their reasoning. If they have some, I would vote for the optional deletion flag as that allows a complete cleanup for any case. Even with plugins |
This sounds related to https://core.trac.wordpress.org/ticket/43162, which has a similar answer:
This filter is fired via |
In any case I would vote for a flag to drop all tables for a site based on its prefix. Like |
I like the idea of having this available as a flag as well @JanThiel. 👍 I wrote a "delete orphaned multisite tables" custom WP-CLI command years ago that has been well received. I think adding this to WP-CLI as an official flag would be a great idea. https://github.com/shawnhooper/delete-orphaned-multisite-tables |
With the aforementioned core ticket this would be automatically handled for us, no need to add another flag. |
@swissspidy Many plugin developers won't use that filter though, leaving behind a mess. Giving CLI the ability to do some cleanup would be nice I think. |
@swissspidy Just checked that core ticket. You are right, that will solve this issue directly in core once and for all. Should we close this issue as wontfix? Should be reasonable not to duplicate functionality in WP-CLI that will land in core shortly. |
I think we can leave this one open for now and revisit once the core ticket is merged. |
Just for reference, here is the reply from GravityForms:
|
When deleting a site within a Multisite with
wp site delete <id>
custom tables within the DB created by plugins remain within the database.Possible solutions:
wp_<id>_
using SQLWP-CLI 2.8.1
WP 6.3.1
The text was updated successfully, but these errors were encountered: