WordPress Bits

Hacking WordPress. Keeping the bits together.

WordPress Options follow-up

Posted by Leonid Mamchenkov on August 12, 2007

After the “Quick access to WordPress options” post got published, I’ve got plenty of questions, most of which could be rephrased as one of the two:

  1. What does each displayed option mean?
  2. How can I delete unused options?

While a comprehensive description of each option is yet to be done, I thought I’d do another post with a few links that might clear up some confusion.

The meaning of options

I found a few places on the web with descriptions of different sets of WordPress options. Most of those descriptions are very limited (5-10 options each) and very outdated (covering versions of WordPress prior to 2.0, or even 1.5). Here are the best two links that I came up with (they link to each other):

A message to plugin developers

If you are a plugin developer, and your plugin adds any options to WordPress options table (wp_options), then, please, make everyone’s life easier and provide short descriptions of the options that you create.

To do so, you don’t even have to write any documentation or anything like that. You can do it straight from the source code. Here is an example for you:

add_option() examples

Option descriptions should be given only at a time of add_option() calls. update_option() and delete_option() don’t need the description. And here is how the results of the above examples look on the options.php page.

options.php example

As you can see (Updated: if you can’t see, your screen resolution is a bit lower and the image doesn’t fit – view image full screen. My bad.), both my_bad_ options provide no hint of what they are, while both my_good_ options have a tiny description on the right (OK, the description is not all that useful, but it’s just an example, isn’t it?).

Modifying WordPress options with phpMyAdmin

If you aren’t all that friendly with MySQL command line tool, phpMyAdmin is probably the best option for you to have some control over your MySQL installation. I came across a nice guide (complete with pictures) on how to use phpMyAdmin to modify WordPress options. The “Delete Option” isn’t covered, but the button should be somewhere there.


5 Responses to “WordPress Options follow-up”

  1. GaMerZ said

    better still, always create uninstaller for your plugins.

  2. GaMerZ,

    I’d say that uninstaller is an addition, not a substitution to option descriptions. If uninstaller didn’t work for any reason, I’d still have to guess the options. Or if there is a name conflict between two different plugins, an option description might make it so much easier to troubleshoot.

  3. Thanks but I am kinda afraid of messing with the DB even though I take weekly backups. My Web Hosting is about expire and I am planning of moving to a different host soon. hence I would need to reinstall wordpress, so for the time being it solves my question.

  4. Jeremy said

    Create the uninstaller by using the register_deactivation_hook, by the way.

    Option descriptions are actually being pruned from WordPress 2.3, so I would recommend plugin authors to not bother.

  5. […] WordPress Options Follow-UpFlexi Pages WidgetFile IconsWP-Directory Plugin – turns any page into a directory […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: