When you delete a site in your wordpress network, it apear like suspend:
For delete a site, user have to click a link that wp send to his email, when he checked the site be suspended, but it doesn’t deleted.
I want to do that the user can delete his site.
I know this is a 3 year old question but there was no answer so here it is:
For the best data and file cleanup experience please read my additional notes at the bottom:
The basics:
Additional Notes:
If you use the MU domain mapping plugin it is recommended to delete the entry for the domain you are deleting. Network Admin->Settings->Domains->Delete.
If you delete the site with plugins active that had created database tables, then those tables are not cleaned out when you delete a site. They will remain as artifact tables. What I recommend is to take note of the blog id of the site you are deleting. For example the 8th blog in the mu install will have tables named wp_8_ prefix. This should help in identifying artifacts later.
If you are not database savvy then the best path to go is to deactivate or remove plugins before getting rid of your site. You may still need to delete some tables manually but at least this will help. Some but not all plugins (depends on the plugin author) have a “remove all data when deactivating/uninstalling plugin”. I highly recommend that you check each plugins settings that are locally activated for the current blog you are trying to delete (plugins that are NOT network activated) and choose this option.
Examples of popular plugins that leave artifacts behind are woocommerce and ewww image optimizer. Woocommerce for example does have a remove all data option in its settings tab which will remove its tables from the database (I am unsure of ewww off the top of my head).
After you have done the removal of plugins and the deletion of the blog you can check to see if there are any artifacts that were missed from plugins that were not self cleaning. A simple mysql query can show us whats left in our example of blog id 8:
You can then remove each table with something like:
If you have alot of tables to cleanup. See:
Dropping all tables with same prefix