June 28, 2020 at 21:11 UTC - Views: 13 #64746MMWBAdminParticipant
over the years and the use of Weaver II, Weaver Pro & Weaver Xtreme I collected quite some Options in my WP-database, most of which are autoloading.
I’d like to know whether I can safely get rid of options like:
Changed autoload to NO for these options, but would prefer to delete them.
Good idea?June 28, 2020 at 22:32 UTC - Views: 12 #64748scramblerModerator
If you are no longer using Weaver II, then everything related to it can go.
Keep a backup if you have doubts 🙂
Note: I am not sure why any of the Weaver II stuff would be loading if you are not using the theme though…
May be @weaver can clarifyJuly 2, 2020 at 19:29 UTC - Views: 6 #64765WeaverKeymaster
I believe that “autoload” is a WordPress option, and is on by default for new theme and plugin settings. So, if I understand the option correctly, WordPress will load all options in the main WP database marked as autoload.
Furthermore, while WordPress does support a special callback to a plugin when it is deleted (but Weaver II plugins did not support that), it does not offer such a call back for deleted themes. Thus, at least for themes, it is not possible for a theme to automatically delete its setting when the theme is deleted. Many plugins do have that option, but the self-clean/delete function is often set as an option (usually to not autodelete). Autodelete is a fairly dangerous function, as it is common for users to delete plugins or themes with the intention of re-installing a new version or to debug problems. So if settings were autodeleted, then things would get lost.
There aren’t really good solutions to the problem of obsolete or no longer used main WP database entries. There is no naming convention, no requirement to have an entry in a database option set that links it to a specific theme or plugin, so you couldn’t even build a cleaner plugin to check for unused database values.
So, you have to do it all by hand, and eventually manually scan through the database to delete the old values. Kind of ugly.
More recent themes (not including any Weaver yet) use a different WP database entry (theme_mods), and probably could now use a plugin to clean unused theme values.
- You must be logged in to reply to this topic.