Is altering a default WordPress database table update safe?

dbDelta is squirrelly. Some things it will alter, others it will not. For example, and if I remember correctly, you can add indexes to tables but not change those indexes or delete them. I honestly don’t know if it will remove table columns. (My guess it that it won’t but I may test that later.)

Nonetheless, I would not do something as critical as add columns of data to a Core table. Even if dbDelta leaves those columns alone, WordPress may (please please please) eventually adopt a more flexible database tool and that might remove your columns. Don’t do it.

If you can’t use the options table or postmeta or another table as it is intended to be used, create your own meta table for the taxonomies. WordPress, and dbDelta will leave that alone. Of course, you will have to deal with the SQL to retrieve that data but you were looking at having to do that anyway.

Leave a Comment

tech