I have deleted one of my sites in a multisite install.

When I add a new site, it skips the site I deleted and creates a new one.

I would prefer to know that all aspects of the old site were gone including any wp core tables that might keep count of sites added historically.

Is there a way for me to purge dead sites so their ID can be reused ?

What sayeth the group ?

Jay CompuMatter

1 Answer 1


The ID is just an identifier in the database. Every new row (site) is added at the bottom, so you will always get a new ID. This is how MySQL works. The only way around that would be a manual edit of the database.

I wouldn't worry about that. The ID doesn't matter on the frontend, and reusing old IDs could lead to conflicts in other part of the code (plugins, users, other tables) that were using the old ID to change their behavior.

  • This is an interesting question for me as well. I personally would like to keep things tidy and remove any of these deleted sites, esp. since many of mine may have been temp dev sites that existed for ten minutes and have been deleted... Feb 26, 2017 at 5:56
  • Yes, I'm a database developer. When I create a new record and am given a new ID that comes after an old one, that's an indicator that the system has at least record keeping data about that ID assignment. I'd like to have all data gone, including that record pointer.
    – Jay Lepore
    Mar 6, 2017 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.