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 don't want people to have to log in, I just want to prompt them with a question and if they can answer it, they can access the site. All the solutions and plugins that I've found seem to be overkill for my needs. Does this kind of thing exist?

share|improve this question
I found this post on the "related" list on the left side after responding to this post: wordpress.stackexchange.com/questions/83926/… I eventually found this plugin which seems to do what I need. wordpress.org/plugins/oa-social-login – nomadic_squirrel Jul 13 '14 at 4:38

You could add a statement to the end that require them to answer a question if they dont have a cookie set and sets a cookie when they do, allowing them access to the site. I'm on my phone but something like this.

if($_POST['q'] == 'answer') { 
// set cookie
} elseif($_COOKIE['q'] != 'cookie') {
// include question template and die
share|improve this answer
this is the kind of thing that I am looking for, I was just hoping that there was a plugin that did it for me :-) – ninesided Dec 28 '11 at 22:11
I'll modify the code I've written to provide a full solution, if you like - let me know. You can accept my post as an answer using the little green tick to the left of it, if you feel I've helped. – George Pearce Dec 28 '11 at 22:49
if you wouldn't mind that would be much appreciated - I'll +1 you for now, will give you a tick if it works :-) – ninesided Dec 28 '11 at 23:08

Alternatively, you could use HTTP authentication on your webserver for the folder your WordPress installation resides in.

If you're using Apache, you can use the following documentation to configure it: http://httpd.apache.org/docs/2.2/howto/auth.html

If you use Lighttpd, you can check out this page: http://2skies.com/docs/basic_http_authentication_with_lighttpd

share|improve this answer
wouldn't this require both a username and a password? I wouldn't have the opportunity to ask the user the secret question! – ninesided Dec 28 '11 at 22:12

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.