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 need to allow registration as part of a build for a client, and I am aware this can be turned on in the admin panel, but can I turn it on in the function?

share|improve this question
up vote 4 down vote accepted

Yes sure you can, just update the appropriate option inside your given function..

update_option( 'users_can_register', 1 );

It's a checkbox option, so the value is 1 = on, 0 = off..

Hope that helps..

share|improve this answer
excellent, now can I remove the setting from the admin panel? – Mild Fuzz Nov 9 '10 at 16:53
Since you've posted the follow-up as another question i've answered there.. :) – t31os Nov 9 '10 at 17:27

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.