Multisite deletion leaving behind files/folders and database tables

I am having an issue, that seems to not be logical, that when I delete a sub site in my multisite setup , all tables in db and files seem to be left behind on server, so its not really deleting. Is this by design, or do I need to adjust a setting?

Is there a good method of going through the trash left on the server from previous installs to clean things up?

  • Michelle Shull

    Hi Jason! That is by design, although it's not necessarily intuitive. You'll see the same issue when you try to delete a member, the data stays in the DB unless you remove it intentionally.

    It's pretty easy to determine which DB tables belong to deleted sites, the site ID number will appear in the table name, like wp_4, etc. If you log in to MySQL, you can select and drop the tables you no longer need with a few clicks. Always take a full database backup first before doing anything with your DB, just in case something were to go wrong. (It will most likely be fine, as long as you select the right tables.) Backups are a good insurance policy in the off chance something goes sideways.

    Hope this helps, and hope you're looking forward to a great weekend :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.