Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think you'll have to code up a custom plugin for this. During the Delete Site process, there are many actions and filters that you can hook into. One in particular you should look at is:</p> <pre><code>wp-admin/includes/ms.php Line 86: $drop_tables = apply_filters( 'wpmu_drop_tables', $wpdb-&gt;tables( 'blog' ) ); </code></pre> <p>So in your custom plugin, address the troublesome plugin tables directly. Add something like,</p> <pre><code>function remove_plugin_xyz_tables($tables) { global $wpdb; $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; $tables[] = $wpdb-&gt;get_blog_prefix($id).'table_xyz'; return $tables; } add_filter('wpmu_drop_tables', 'remove_plugin_xyz_tables'); </code></pre> <p>Some caveats: I don't know how WordPress will handle the situation if the table doesn't exist, so you'd want to test that and you may want to first check to see if it exists and/or if the plugin is active and/or check to see if it's in the array already. This also requires you to add a line for each troublesome plugin, and it assumes the plugin has properly prefixed its tables. An alternative would be to <code>'SHOW TABLES LIKE "'.$wpdb-&gt;get_blog_prefix($id).'%"</code> and merge your result with what WP already knows about. Lastly, I didn't test any of this, so this code is merely to point you in the right direction on developing a solid solution for yourself.</p> <p>Anyway, once your plugin is done, network activate it, and it should take care of all the dirty work for you when a site is deleted!</p> <p>Oh yeah, and alert the plugin author to the issue to. It's possible that s/he doesn't use WPMS and isn't even aware that this is an issue. If you have the means to do so, code up a patch and submit it to that person to save them the work. Open source FTW.</p> <p>Best of luck~</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload