Prevent creation of unused database tables?

admin2025-06-04  1

I have a Wordpress Multisite, and when a new site is created all the Wordpress database tables are created, but most are unused by me. Is it possible to prevent creation of these tables:

_commentmeta
_comments
_links
_termmeta
_term_relationships

They are always empty on my sites, as I have disabled for example comments.

These two tables only ever includes one post:

_terms
_term_taxonomy

Which is uncategorized and category, can I disable this somehow?

I want to clean up the database creation before opening up my site for registration, to not clutter down the database with unneccessary things.

I have a Wordpress Multisite, and when a new site is created all the Wordpress database tables are created, but most are unused by me. Is it possible to prevent creation of these tables:

_commentmeta
_comments
_links
_termmeta
_term_relationships

They are always empty on my sites, as I have disabled for example comments.

These two tables only ever includes one post:

_terms
_term_taxonomy

Which is uncategorized and category, can I disable this somehow?

I want to clean up the database creation before opening up my site for registration, to not clutter down the database with unneccessary things.

Share Improve this question asked Jan 4, 2019 at 9:35 joq3joq3 3813 silver badges21 bronze badges 1
  • This is a terrible idea. You wouldn’t ask how to delete files inside WordPress for features you don’t use would you? So why delete the tables? It’s not going to help performance or anything. It’s likely just to break WordPress. Leave them alone. – Jacob Peattie Commented Jan 4, 2019 at 9:52
Add a comment  | 

1 Answer 1

Reset to default 0

I'm afraid it won't be easy to do (if possible at all).

These tables are empty and you don't use them, but... There are still many SQL queries that use them in JOINs. It means, that if you remove these tables, these JOINs queries will cause errors. There are many functionalities in backend, that use these tables - you'll break those parts too.

On the other hand - removing these tables doesn't make much sense. They're empty, so they won't cause any performance issues. And they're not clutter - they're just DB structure.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749045859a315893.html

最新回复(0)