WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am confused. Want to save data for my plugin. There are people who use add_options and there are others who use register_settings. My question is What is difference between add_options and register_setting?

share|improve this question
up vote 7 down vote accepted

register_setting() uses Settings API, which is just an API for options.php, is easier to use, more secure and preffered way of storing options since WordPress 2.7.

If you need to store only a few options or doing simple plugin just for yourself - it's really up to you which one to use :)

Here's the Settings API (well) explained: http://www.chipbennett.net/2011/02/17/incorporating-the-settings-api-in-wordpress-themes/

Basically it makes a few things much easier, you don't have to render whole forms all over again (great for plugins/themes with many options), you don't need to care about nonces etc.

So, to sum up, both these functions actually do the same thing :)

share|improve this answer
an example, there you can use svn.wp-plugins.org/addquicktag/trunk/inc/class-settings.php – bueltge Apr 24 '12 at 13:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.