Skip to content

WP Require Auth

If you need to make your WordPress site private, this plugin makes it possible for your users having to log in before being able to view any content on the website.

If you find this plugin useful, please make a small donation to contribute to continued development.

Installation

The easiest way to install this plugin is to go to Plugins -> Add New in your WordPress admin and search for “wp require auth”, and click the install button.

To manually install the plugin, upload it to your wp-content/plugins/ directory of your WordPress installation and activate it from the admin page.

Changelog

1.0.2

  • Being nicer to those who still run PHP 4

1.0.1

  • Fixed a problem where it was not possible to upload media using the Flash uploader

1.0.0

  • Initial release

Download

Download at WordPress.org

55 Comments Post a comment
  1. Apr 20 2010

    I tried installing the plugin and just get the following error message:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/content/g/3/3/g33k2u/html/sites/sixxofus/wp-content/plugins/wp-require-auth/wprequireauth.php on line 24

    Any suggestions.?

    Thanks!

    Reply
    • Apr 20 2010

      Do you know which version of PHP you are running on your server? The plugin has currently only been tested with PHP 5.

      Reply
    • Apr 20 2010

      I pushed an update which should make it play nicer with sites still running PHP 4. Let me know if you still have problems after the 1.0.2 update.

      Reply
  2. rimo
    Apr 28 2010

    why there is no logout?

    Reply
    • Apr 28 2010

      This plugin relies on WordPress authentication, and to logout, click logout in the WordPress Admin Panel.

      You may also include a logout link in your template by creating a link which points to “wp-login.php?action=logout”.

      Reply
      • rimo
        May 4 2010

        thank you.
        i got it. i use wp function for logout wp_logout_url().

  3. David
    May 20 2010

    Hey – Love the plugin. I would like to know if after the login-form is filled out and submited, is it possible that the form returns you to the website page rather than the admin page?

    Reply
    • May 20 2010

      Thanks! It will return you to the page you tried to go to before having to log in.

      If you enter http://example.com/wp-admin/, it would return you to /wp-admin/ after you log in. The same goes for going to http://example.com/ for instance, which would return you to the very same URL (http://example.com/) after logging in.

      Is this not the behavior your are experiencing? If so, which version of WordPress are you running?

      Reply
  4. Jun 15 2010

    How can I get this to send to a page other than the admin page?

    Reply
    • Jun 15 2010

      You should be redirected to the same URL you entered before being redirected to the admin page. If you entered the admin url, you will end up there, but if you just enter the main url for the website, you should end up there.

      Let me know if you are still having issues after trying this out.

      Reply
      • kathie
        Jun 15 2010

        Yes, still takes me to the dashboard.I would LOVE for this to work, really need this plugin.

  5. Jun 18 2010

    I installed this plugin but after I installed it… the RSS feeders stopped working…

    Any thoughts as to why that would have happened?

    Reply
    • Jun 21 2010

      Because the feeds will become protected too. I will release an update soon which includes a settings page where you will be able to exclude certain pages (like the RSS feed) to be protected.

      Reply
  6. Jun 19 2010

    I would like to use this plugin in conjunction with the WP ipad/iphone app. The issue is that the XML-RPC feed then becomes password protected, and can’t be accessed by the app. any ideas?

    Reply
    • Jun 21 2010

      I will release an update shortly which will solve this issue. The XML-RPC interface is protected as is, and should not be protected by the plugin. Thanks for the feedback!

      Reply
      • Oli
        Aug 11 2010

        +1 a fix for this would be great!

      • Oli
        Aug 11 2010

        Worked it out…should have looked before posting really.

        Under line 22 of wp-content/plugins/wp-require-auth/wprequireauth.php add the following:

        && (strpos($_SERVER['PHP_SELF'], ‘xmlrpc.php’) === false)

      • Aug 17 2010

        Great! It has been fixed for the next release.

  7. Neil
    Jun 26 2010

    I would like to use a plugin that allows a view of the home page of the site without registration but precludes access to the product/ecommerce pages of the site without users having applied for registration and being granted permission. Would this be possible Johnny?

    Reply
    • Jul 9 2010

      It is currently not possible I’m afraid, but there will be support for that in the next version though. Development is not progressing quickly during the summer, so I can not give an estimate on a release date, but “as soon as possible”.

      Reply
  8. MaryJo
    Jul 21 2010

    I’m wondering how soon you plan to release the update that will make the RSS feeds accessible? I love your plugin and would like to use it on a private site I need to launch in a couple weeks, but I also need the feeds to work. Thanks!

    Reply
    • S
      Jul 22 2010

      I would find this extremely useful too. Any ETA for this?

      Reply
    • Aug 17 2010

      I just got back from my vacation, so I will start working on this soon.

      There will be an admin page where you will be able to specify whether to make RSS feeds accessible among other things.

      Reply
  9. Jul 29 2010

    I’ve struggled with other solutions and was excited to see this nice, simple plug-in, but I’m having the same problem as Kathie above — when I log in using an ID and password assigned to someone at Subscriber level in WP, it still takes me to the administration page. I’d be grateful for any ideas or fixes. – Steve

    Reply
    • MaryJo
      Aug 11 2010

      Steve…I send my users to the main URL of the site and then the login screen comes up and it takes them to the home page (no admin page).

      So I use this URL:
      http://mywebsite.org/newsletter

      Perhaps you’re using one like this?
      http://mywebsite.org/newsletter/wp-login.php

      Reply
      • Steve Morgenstern
        Aug 16 2010

        MaryJo -

        No, it loads the admin page even when I specify the main page. I’m guessing there’s some difference in the way our hosts organize their files (I’m using GoDaddy).

        - Steve

      • MaryJo
        Aug 17 2010

        Weird. I’m using GoDaddy too so it must be something else.

    • Aug 17 2010

      I am unfortunately unable to replicate this behavior on my end. What does the URL look like when you are taken to the login form?

      There should be a redirect_to parameter, which should be the URL of the page you entered before being presented with the login form, ie. it should not say /wp-admin/ in the end.

      If you don’t want to divulge the URL publicly, you can send me an email with the URL, if you are unsure.

      Reply
  10. Aug 27 2010

    I love your plug-in but I recently was notified that my new users can not register on the website now because it is password protected. Is there a good way around this or is this issue something caused on my end?

    Reply
    • Sep 6 2010

      The next version will have an option for opening up the registration page.

      Reply
      • Vishal Saraf
        Sep 12 2011

        Is this released? I need to have the registration work, right now it keeps redirecting back to the login page, sort of a loop.

  11. Anders
    Oct 9 2010

    Your plugin makes the WordPress Android App fail with the following error:
    org.xmlpull.v1.XmlPullParserException: unexpected type (position:TEXT XML-RPC server a…@1:42 in java.io.InputStreamReader@43074f20)

    Is there something that can be fixed?

    Reply
    • Oct 10 2010

      Yes, definitely. It will be fixed in the next version. I just released a new version of wp-facebook-like, and this plugin is the next in line to get an update. Stay tuned.

      Reply
  12. Nov 17 2010

    Do you have an ETA for the plugin being updated? I could really use the unlocking of the RSS feeds and the ability to not have specific pages affected by this plugin. I have a couple pages that need to be public with all other pages locked until the user is logged in.

    I’ve got a donation to the plugin upon completion of these two items (I’ve donated to plugin developers before completion and they never did the update…lesson learned).

    Blessings,
    Wendy Merritt

    Reply
  13. Dec 4 2010

    I use this plug in to keep a private group blog for my family; it’s great, and I’m really looking forward to the update that will allow for RSS feeds. Thanks for all the work you’ve put into this already!

    Reply
  14. Jan 3 2011

    Same problem as above.
    User is directed to link direct file name even (index.php) after sucesful login user is directed to panel instead of site.

    Not sure how to get around this.

    Reply
  15. Jan 12 2011

    I hear you. I will try setting off some time this weekend to fix these much needed features:

    - redirect to the correct page
    - unlock the rss feed

    Thanks for the patience everyone. I have been very busy lately.

    Reply
  16. Chris H.
    Mar 6 2011

    I’m very much looking forward to the version with the unlocked RSS. I have a family blog that would greatly benefit from this. Any word on when it might be available?

    Reply
    • Apr 29 2011

      I’m looking forward to that feature as well. I would like to be able to create an RSS fed email from MailChimp but I cannot until the RSS is unlocked. I think he’s been working on it.

      Reply
  17. Apr 19 2011

    Is anyone else having Internal Server Errors with WordPress 3.1.1 and this plugin? I did the update to WordPress and now I can’t seem to get rid of the error. WP-Require-Auth is the only plugin activated. Any fixes?

    Reply
    • Apr 28 2011

      I have been unable to replicate this problem. Is it possible for you to check the error log for a message?

      Reply
      • Apr 29 2011

        I ended up upgrading my hosting package from a shared hosting to a VPS hosting. After everything was moved to the new server the problem never repeated itself. I have no idea what it was or how it was resolved but hooray it’s gone.

        Thanks for your willingness to help.

  18. Josh Amyx
    May 24 2011

    Thanks so much for your work on this plugin! It’ll be fabulous when it redirects correctly!!!

    Reply
  19. Jun 12 2011

    I added the information from above:

    Under line 22 of wp-content/plugins/wp-require-auth/wprequireauth.php add the following:

    && (strpos($_SERVER['PHP_SELF'], ‘xmlrpc.php’) === false)

    in order to release my RSS feed from the plugin but I still get an error from W3 feed validator:

    It looks like this is a web page, not a feed. I looked for a feed associated with this page, but couldn’t find one. Please enter the address of your feed to validate.

    Any ideas? Any news on the updated version of the plugin?

    Reply
  20. Ram
    Aug 15 2011

    Works like a charm! You saved me hours! Thanks :)

    Reply
  21. Sarah
    Aug 22 2011

    Hi There, a little new to all this. But using this plug-in, do you have access to the details of those who sign in? In admin do you receive a database of sorts?

    Also, may I just check, this plug-in simply allows users to read protected content, they wouldn’t gain any admin rights?

    Thanks

    Reply
  22. Oct 12 2011

    Hey

    When i activate the plugin i get the following error:

    Warning: Cannot modify header information – headers already sent by (output started at /customers/8/4/d/sommerstedgade2123.dk/httpd.www/index.php:3) in /customers/8/4/d/sommerstedgade2123.dk/httpd.www/wp-includes/pluggable.php on line 934

    Can you please help me out?

    Reply
  23. Charlotte
    Oct 26 2011

    Hi,

    I am wondering if there is a way to customize the login page – I am specifically looking to replace the WordPress logo.

    Is this possible?

    Thank you

    Reply
  24. Nov 1 2011

    hi there …

    listen i dont know but maybe you can help me …

    i have an ecommerce site with a flex commerce framework …. my site in only for registered user … so i have installed some plug-in:
    - branded login-screen
    - peter’s login redirect
    - register plus redux
    - wp require auth

    all this plung-in because i dont want that my customers see the dashboard WP … and enter only if they are registered users…

    but it’s several time … that some happend … when u logged in … then redirect to the main page… a few second later the system kick-u-out … ??? then u must loggin again …
    this happend with firefox, chrome, explorer little bit … sometimes safari too..

    can u help me???

    thanks!

    Reply
  25. Mirko
    Nov 1 2011

    i have a Problem..

    When I use Chrome… when i click any links it log out me…
    Why?

    Reply
  26. Jan 10 2012

    About redirecting to Admin Panel after login.
    This one happens only, when You login as an admin user. Regular users are beeing redirected correctly.
    Any ideas how to make admin also beeing redirected to the page passed in redirect_to variable?

    Reply
  27. Mar 6 2012

    I have the same problem as Mirko. Anything I click logs me out and then I have to log in again.

    (only happens with admin accounts)

    Reply
  28. Scott
    Mar 16 2012

    Does this work on WordPress 3.3.1? It seems to quietly fail.

    Reply

Trackbacks & Pingbacks

  1. Require login to view a Wordpress site | Johnny Chadda .se
  2. » WordPress Relief – @wprelief – Disable your Website to Visitors but not Users – Part II

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments