I'm in the process of re-launching several Wordpress sites with the goal of improving speed/security and growing the sites.
Most of my WP sites used plugins that I eventually chose deactivated and deleted due to lack of maintenance of the plugin, etc.
Unfortunately plugin deletion often leaves a lot of rot/detritus - useless fields - in the WP database tables AND I am concerned that the extra db fields may make future forensics, redesign or upgrade efforts problematic.
FWIW, the WP sites aren't that large ~100 to 200 pages/posts, so I've even considered entirely fresh installs and using backups of the text, images, page meta data to perform a rebuild from scratch. Maybe this is the best way to go . . but . .
I've been able to remove many unnecessary fields by simply examining the "field names" in the WP "Options Table" since often, but not always, the field has a prefix that identifies its association with a plugin - such as aioso or wptc.
The problem with cleaning the Options Table is the lack of uniformity in identifying which field was added by which plugin. (Hint. Hint . . to Wordpress coding authorities.) Not all have a prefix.
I've been doing a bit of Options Table "DNA analysis" by Goggling uncertain field names in the Options table but that sometimes leads nowhere.
I have referred to the WP Codex and my own fresh WP installs - ones without plugins - to help clarity which fields are essential or "core", but that still doesn’t tell which "other fields" are nonessential. Why? Because there are still other active plugins, usually 4 or 5.
I guess I could do 5 fresh WP installs, add 1 plugin to each fresh install, and build a list of the Options Tables fields they add. THEN, IFF I was a database pro, I could probably write a SQL query that could "look for these fields" (from my list of needed fields) and "delete all the rest". (Any database pros out there? Anyone know the query that would execute that idea?)
It would be REALLY NICE if a) each plugin had a text file identifying exactly what fields the plugin added; or, b) if there was a repository of the fields added by each plugin. Of course, there would probably be issues of fields being added or dropped as the plugins were updated. Argh.
1. Is there a slice of PHP/code that I can look for in any plugin that would help me identify what fields the plugin is inserting or has inserted? I'm assuming there is a usual or common routine/process/lines of code, in the plugin installation process, that instantiates a procedure/process for naming and creating fields in the WP options table - and in that chunk of the install process - there is probably an easy way for me to "spot" the names of the fields being created in the Options Table.
2. Is anyone aware of repositories of Options Tables names, beyond those in the basic WP install?
3. When WP is upgraded BY WP do the installs always include deletion of "no longer functioning" Options Tables fields? Or, do I also have to go looking for the names of "old, no longer used WP-core fields that might still exist in the Options Table"?
4. I've been researching whether there's any way to cross-reference or correlate fields in the Options Table with any other tables or fields in the WP core database. In other words, IF other tables are "written to" as a result of the creation of fields in the WP Options Table. IF such "writing to other tables" takes place it would make sense to consider deleting fields in the other tables once the Options Table field is deleted. Thoughts?
I just would prefer to remove as much unnecessary crap as possible, before some "genius" :P discovers a way to take out the site by exploiting the trash in the tables. So, I'm looking to maximize my housecleaning effort.