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.

DOWNLOAD

Download at WordPress.org

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

59 thoughts on “WP Require Auth

  1. Jamie

    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
    1. Johnny Chadda Post author

      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
    1. Johnny Chadda Post author

      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
  2. Pingback: Require login to view a Wordpress site | Johnny Chadda .se

  3. David

    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
    1. Johnny Chadda Post author

      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
      1. kathie

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

  4. Luke

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

    Any thoughts as to why that would have happened?

    Reply
    1. Johnny Chadda Post author

      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
  5. Michaela

    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
    1. Johnny Chadda Post author

      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
      1. Oli

        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)

  6. Neil

    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
    1. Johnny Chadda Post author

      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
  7. MaryJo

    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
    1. Johnny Chadda Post author

      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
  8. Steve Morgenstern

    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
      1. Steve Morgenstern

        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

    1. Johnny Chadda Post author

      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
  9. Jonesy

    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
      1. Vishal Saraf

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

  10. Anders

    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
  11. Wendy Merritt

    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
  12. J.D.Harper

    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
  13. Aaron

    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
  14. Johnny Chadda Post author

    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
  15. Chris H.

    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
    1. Wendy Merritt

      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
  16. Pingback: » WordPress Relief – @wprelief – Disable your Website to Visitors but not Users – Part II

  17. Wendy Merritt

    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
      1. Wendy Merritt

        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

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

    Reply
  19. Wendy Merritt

    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. Sarah

    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
  21. Theis

    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
  22. Charlotte

    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
  23. maximiliano

    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
  24. Kuba Florczuk

    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
  25. Flint

    Thanks a lot!
    I suggest adding:
    && (strpos($_SERVER['PHP_SELF'], ‘xmlrpc.php’) === false)
    to the test.
    This way, you are still able to use the api with mobile apps for example, which require a login anyway…

    Reply

Leave a Reply