WP-Members™

WP-Members™ is a free plugin to make your WordPress® blog a membership driven site. Perfect for newsletters, private blogs, premium content sites, and more! The plugin restricts selected WP content to be viewable by registered site members. Unlike other registration plugins and WordPress® itself, it puts the registration process inline with your content (and thus your branded theme) instead of the native WP login page. WP-Members™ works “out-of-the-box” with no modifications to your theme, but it is fully scalable for those that want to customize the look and feel, or want to restrict only some content. It is a great tool for sites offering premium content to subscribers, and is adaptable to a variety of applications.

I would suggest that you sign up for the premium support membership.  At $47, it is a good value and this price gets you access to the support forum, priority email support, a code snippet library of customizations, and access to exclusive plugin extensions such as registration blacklist, user tracking, PayPal subscriptions, and more.

Download the plugin

The plugin is currently maintained at the WordPress Plugin Repository. You may always find the current production version there.

Support documents

The primary support documents I have created are the Quick Start Guide, a visual support document to get you started, and the Complete Users Guide, which documents all of the features of the plugin.

Tips and Tricks

There is a difference between Posts and Pages in WordPress. If you use WP primarily as a CMS using pages for content, you should review this post:

Translation and Localization

If you are using WordPress in a language other than English, the plugin has been adapted for localization.  A POT file and existing translation files are available.

Plugin Name

This plugin has been named WP-Members™ since its public introduction in 2006.  Back then, it was the only plugin doing what it does.  Since then, there have been some commercial plugins that have hijacked the name.  I have released some statements with information regarding the name:

  • http://arklatexmoaa.org Davej

    Okay, I’ll keep digging.

  • http://www.fastlinenews.com FastLineNews

    is there a screenshot image to use this plugin? I still do not understand

    • http://butlerblog.com Chad

      What is it that you don’t understand?

  • http://www.nicolasroos.com nicos

    Hi !

    I’ve been playing with your plugin, and I first want to congratulate you on the work done here !

    I’ve been able to use the hooks to integrate this with mailchimps lists and do some other good stuff.

    There’s one thing I’m missing: the ability to redirect the user to the page he was on after registration.
    example:
    User on blocked content – login form is displayed (in my template, via do_shortcode() )
    User clicks on the register link
    He registers
    But then he is redirected to the home page (or some other page).

    Any idea on how I could redirect the user to the page with blocked content he was viewing ?

    I’m thinking of a few different solutions (like settings a new php session var and reidrecting via the register action hook)…
    Any idea for an elegant solution ?

  • http://www.kenvinformma.com Scott

    Chad, WP-Members is fantastic! Thank you ! I have a (hopefully) quick question. I have a registration / edit account page; just an empty page with [wp-members page="register"] in it.

    At first I referenced no css url in the settings field in WP-Members setting, but the form looked terrible. Using the WP-Members documentation I changed the setting to point to wp-members-kubrik.css. The form looks much better, but the entry fields are all shifted down one line so that “Last Name*” lines up with the entry field for First Name, Address 1 lines up with Last Name, and so on. I’m not a css guy so not sure what to look at to fix this or if its a bug or what. Any ideas?

    Also, I did try to turn on “Use Legacy Forms” in WP-Members settings, and I like the result, but then the Login form on the sidebar becomes all jumbled, misaligned and looks awful. Obviously I’d like to stick with the css approach so trying to fix the registration/account css to work. Thanks for the help Chad.

    • http://butlerblog.com Chad

      First, I would suggest avoiding the legacy forms if you can. They will be deprecated in the 2.8 release. They are table based and much less flexible (although they do have limited CSS properties).

      Either way, you’re going to probably have to learn some CSS (or hire someone) to make things look seamless with your theme. With the vast number of theme’s out there, there simply is no one-size solution. Consider the included stylesheets a starting point for what can be done.

      Here is where you want to start: http://butlerblog.com/2011/07/25/customize-the-wp-members-stylesheet/

      A good thing to remember with customizing the stylesheets – you can’t really break it. It is simply layout, not functionality.

      Also note, you can do more than just tweak what is already in there. You can add property definitions as well (and depending on your theme, you may find you need to). I find that using Firebug (http://getfirebug.com) helps track where properties are coming from. That way I know if I need to add a property definition or not.

      • http://www.kenvinformma.com Scott

        Thanks for the quick response, Chad. I’ll give those suggestions a try.

  • Marc

    Hi,
    Congrats for this plugin !

    I’m using it for several days now and I just have one problem : when a subscriber receive the confirmation email (after moderation), the password shortcode doesn’t show the user password but just some blank.

    But when a user resets his password, the password shortcode just works fine.

    What’s the problem ?

    Thanks in advance.

    • http://butlerblog.com Chad

      That is quite strange because the exact same function (and shortcode parser) is used for both emails. My suggestion would be to double check the shortcode that is not working VERY carefully. Maybe something is mistyped or encoded incorrectly.

      • Marc

        Thanks for your answer.
        I’ve checked that several times.

        I was wondering if there was some kind of logic like “a password chosen by a user shouldn’t be shown”.

        But if you confirm that it should be working for random password AND “user chosen” password, it’s very strange indeed.

        • http://butlerblog.com Chad

          Ahhh… you didn’t mention user chosen passwords. Is that what you are using? Is so, it will not send the password to the user when they are activated. This is because when the user sets their password, it is stored with WP’s PHPass encryption algo. In order to send them their password, we’d need to be able to decrypt it. The reason that random passwords can be sent at activation is because that is the point at which the password is set, so we actually have the password.

          For user chosen passwords, you should change the default emails and send the password when they originally sign up (and indicate their registration is pending approval), then the activation email can merely indicate they are approved.

          • Marc

            Thanks a lot, it works perfectly like this !

            BR

  • http://www.gleberowingclub.org.au Adam Ramshaw

    Chad,

    I’m moving the above site from Joomla to WP and have installed WP-Members on a hidden url.

    I am having a problem with admin notifications of new user registrations. The applying person gets an email but not the admin.

    The right email address is in Settings/General/E-mail Address
    Settings/WP-Members/Notify admin is ticked.

    I’ve checked a couple of leads from you FAQ and other comments but can’t find the problem.

    I’m mystified. Any ideas?

    Thanks.

    • http://butlerblog.com Chad

      It could be possible that your host is throttling the emails. To combat spammers, some hosts place restrictions on emails sent from scripts. I would suggest trying an SMTP plugin for the wp_mail function such as WP Mail SMTP. This allows wp_mail to send via an authenticated SMTP connection.

  • http://www.prissyg.com seanyp

    I have two questions or really one that is dependent on the other. 1) Is there a way to customize the email that is sent to include HTML? 2) The second question would be. Is there anyway to add an additional field within the email once it is customized?

    • http://butlerblog.com Chad

      At this time, emails are plain text only. An HTML mime type might be added in the future, but I don’t know when.

      The fields listed here are the fields that are available.

      • http://www.prissyg.com seanyp

        Thanks for your prompt reply chad. Well I just encountered this post that you replied to and will be testing it out.
        http://wordpress.org/support/topic/plugin-wp-members-changing-some-apects-of-the-registration-process

        I’m currently working on the site above, but the client wants each member to be issued a unique number in a specific format. Additionally, they already have some members with this format of member number that I will be importing.

        • http://butlerblog.com Chad

          If you have some type of algorithm to generate your unique number, you could probably use the wpmem_post_register_data action hook. This hook fires after the user data is validated and the user is registered, but before the process if final. You could use the hook to add your unique id to the user meta table.

          • http://www.prissyg.com seanyp

            Yes I’ll try that and let you know how it goes. I also need to send out a customized email with a logo and that number, so I’ll have to also edit the files mentioned in your post
            http://wordpress.org/support/topic/plugin-wp-members-changing-some-apects-of-the-registration-process

          • http://www.prissyg.com seanyp

            Well I’ve finally gotten it to work. What I did was add the necessary code to your email module (wpmem_inc_regemail) to create the HTML email there. I also edited wp-members-register.php so that it would use the update_user_meta() function to add the additional fields I needed inside the wp_usermeta table.

            One problem I experienced though was an inability to access a table with unique keys I had inside the WP database. I globalized $wpdb at the beginning of the function (wpmem_registration) and then made a call to the $wpdb->get_var() with the hope of getting the unique key to store inside the usermeta for that user but that somehow did not work. I ended up using the $user_id along with another internal algorith for this extra field.

          • http://butlerblog.com Chad

            I’ve been putting some thought into this comment this afternoon. The first part is concern for you is the ability to maintain it through plugin updates. Here are some of my thoughts on expanding this:

            I think that everything you have here is likely in a pluggable function. You can tell if the function starts with if ( ! function_exists( 'name_of_function' ) ):. If that is the case, make sure you are putting these changes into a wp-members-pluggable.php file in your plugin’s directory (not the wp-members directory). That way, when the plugin is updated, you won’t lose your changes, and then have to re-edit the files. You may still need to check to see if there were any changes to the functions you customized, but that’s less work that re-doing everything (or worse – avoiding an update). If that’s the way you are already doing it, great. If not, check out this post for more information.

            But I think more importantly, I was thinking about your customization to the registration. My first thought was to use the wpmem_post_register_data action hook which would allow you to run your extra items in a separate function right after the registration process so you would at that point have validated data and a user ID which you could use to run your algo. But then I realized this hook comes after the email is sent, not before; and you need the algo to run before that so you can include the extra ID.

            That got me to thinking about a couple of things. First, the possibility of moving this action hook up before the email is sent. As you can see in the function, this would be just flipping the two. I think that might make sense to do. I’ll need to test it though before I change it to make sure there isn’t anything I’m missing here.

            The second thing I thought of came during my thoughts about flipping the two items and that was why not add an action or filter hook for the email there as well. That might solve both your issues because if you access these two things via hooks, you wouldn’t have to worry about keeping this thing up to date. And I think that a big chuck of what you have already wouldn’t need too much in the way of changes for that to work.

  • http://www.pbonline.be/ PB Online infoweb

    Hi there,

    WP-members is a fantastic plugin. Thanks.

    But how can registered members recover their password (when they lost it) ?
    I can’t find any shortcode to put on my site so that members can recover it.
    In a regular registration of WP you have that option.

    Can someone help ? Thanks in advance.
    PB Online infoweb.

    • http://butlerblog.com Chad

      Actually, you can’t recover it in WP either. WP stores its passwords securely encrypted using PHPass. So, you can reset it, but you can’t recover it. WP-Members operates on the exact same premise.

      The password recovery process for WP-Members is part of the Members Area page which is a single shortcode. [wp-members page="members-area"] creates a page that will allow logged in users to update their registration information and change their password, and it will allow non-logged in users to reset their forgotten password. Additionally, if you set the URL of this page into the plugin’s settings, a forgot password link will be placed into all of the login forms.

  • http://www.methlab.it cuttlefish

    Hi, and thank you for your great plugin.
    I’m facing a weird problem: i’m working on new site where all pages include the NextGen gallery plugin. In this site I have created a wp-members private page (using a “block” custom field), but when a open this page, the login form is rendered twice: one in it’s correct position, and one in place of the gallery. When I’m logged, the page and the gallery are properly shown. Can you help me?

    • http://butlerblog.com Chad

      Assuming you haven’t put any wp-members shortcodes on the page, it sounds like a situation of having more than one instance of The Loop. WP-Members works within The Loop to determine of a post/page should be blocked or not, and then replaces the_content with the login/registration dialog. In cases where there is more than one Loop instance, you end up with a doubling of this process. I’m not familiar with the NextGen gallery, but I suspect that it uses it’s own Loop instance to generate the gallery and that’s why you are getting the extra forms.

      There’s isn’t a true workaround for this. If the NextGen plugin uses a shortcode on the page, you could try putting this shortcode inside of the wp-members status shortcode like this:
      [wp-members status="in"][your nextgen shortcode in here][/wp-members]
      That way, the shortcode inside should only render in cases where the user is logged in. I’m not 100% sure that will solve the issue, but that’s what I would try.

      • http://www.methlab.it cuttlefish

        Thank your for your reply. The problem is the loop, as you suggested. I used is_user_logged_in() (i don’t use shortcode to display the gallery) to hide the gallery. This seems a good solution. Bye.

        • http://butlerblog.com Chad

          Ahhh yes, that would work too. Good solution.

  • http://www.ludacowebdesign.co.uk/ Rob Noble

    I’ve been looking for a solution like this for ages to provide a client with this type of functionality for an events management website. Their clients will be able to logon and view their own content far more effectively and securely.

  • http://www.kgoc.org.uk Greg Smith

    Great plugin. Really appreciate it.
    One question to manage a large number of Members as shown in the WP-Member Users in the table in the dashboard how can I get “Surname” to replace “Username “as the first column? Help much appreciated. Thanks Greg

    • http://butlerblog.com Chad

      Hi Greg – at this point, you can’t. The functionality on that table is currently limited to the functions that are there now. I’ll probably be building this out in future versions though to provide more customization. Your alternative is to use the WordPress User list which is under the same menu. That can be sorted by name (although it sorts by first name first). You could also hack the function that builds that table in wp-members-admin.php, although that’s not recommended as it’s not a pluggable function.

  • Chris

    Hi: I was wondering how can I create a separate menu to be only visible to the members that are logged-in. So a menu visible for non-members and another menu visible for those who are logged in to site. Thanks!

  • http://www.prissyg.com seanyp

    I actually revisited the code and placed my changes in a wp-members-pluggable.php file after thinking about updates. Yes I tried the wpmem_post_register_data hook first but realized they fired after the email. It would be great to have some filters for the email as you suggested though. I was actually thinking of adding them for you but you know your code better than I do. :)

    • http://butlerblog.com Chad

      I’m pretty sure it makes sense to move the location of that action to be before the email.

      I’m open to suggestions on hooks for the emails if you have any thoughts.

  • http://FacebookConnect Jesper

    Would it be possible to implement a facebook connect for the signup process in this plugin?
    or do you know if it can work together with any of the million facebook connect plugins for wordpress?

    thanks

    • http://butlerblog.com Chad

      As long as the other plugin is compatible with the WP login process (usually using wp_signon), then yes, it should be compatible. However, depending on the fields you want to require from users, it should be noted that adding a login from an outside source like fb or twitter, that login will bypass any required fields (although you can get this data if a user updates their registration info).

      • http://FacebookConnect Jesper

        Awesome!

        I made it work with a facebook connect plugin so that people can sing up by just connecting with facebook.
        However if they try to access the locked post without connecting to facebook they get the sign up form delivered by WP members.

        Is there anyway to style the signup form and add the facebook connect button (which I have as a shortcode from the other plugin)

        thanks

  • Marc

    Hi again,

    I have more than 220 users with wp-members meta informations and I need to export them.
    But WP-Members export only applies on checked users (ie 10 users at a time).
    I can’t do that more than 20 times and then append all the results in one csv file, it’s too much work (because it’ll be a recurrent job).

    Is there any way to export ALL the users registered in the WP admin panel ?

    Maybe some code to show all users in the table ?

    Thanks in advance.

    • http://butlerblog.com Chad

      Select “Not Exported” at the top of the page. It will give you a list of all of the users that have not yet been exported.

      • Marc

        Thanks !

        Sorry, I didn’t see that “Not exported” was listing all not exported users in one page.

        But would it be possible to have that with All users because we’re 3 admin on the site and we could have some bad synchro if someone export on his own.

        Thanks in advance.

        • http://butlerblog.com Chad

          I’ve been working on some various changes/upgrades to the user management area. Some of that will likely be included in the next update. There will be a full user export option for sure.

  • http://nswhat.no mortenmr

    Hi,
    I have set up the wp-members to control access to my site nswhat.no
    Logging on and registering works just fine, but when clicking “Forgot?” does not do anything. I’ve set up member page in “WP-member” settings, but have not seen any going on.

    Thanks for any help!

    • http://butlerblog.com Chad

      It doesn’t appear that you’ve published the page.

      • mortenmr

        I have, but it’s the same as the main post page. I haven’t set up a particular wp-members page apart from that.
        I found a way to linking to the standard WordPress lost passwords page, and it looks like it works…

        • http://butlerblog.com Chad

          It can’t be the same as the main post page. It would be the page that you set up using the [wp-members page="members-area"] shortcode. When I looked at your site, you had this set as page_id=6, but trying to access that redirected to the front page, which to me indicates that it either is saved as a draft page or you have something else not configured correctly.

          • http://www.nswhat.no mortenmr

            I tried that, but the same error. I’ve also used a plugin called User Access Manager, to control website access between user groups. Turning this one off, displayed the members page with retrieve password correctly.

            I’ll check into the settings of UAM, to see if that solves it.

  • http://www.nswhat.no mortenmr

    Do you know if there is an easy way to have an automatic redirect after logon? We have a closed website for registered users only, and want to have the wp-member login as the standard homepage when opening the site. If the user is logged on, though, we’d like the user to automatically be redirected to the main post page or forum, depending on their user group.

    Do you know of any plugin that could do this for wp-member? Peter’s Login Redirect seems like what we want, but I can’t get it to work with wp-member.

  • http://gov20radio.com Allison

    Hi – great plugin, thanks so much. Just a question on usernames – it seems that the registration won’t allow capital letters for usernames – is this right, and if so can they be enabled? The error message says that only alphanumeric usernames are allowed, and I would have thought caps would qualify. Thanks!

    • http://butlerblog.com Chad

      If you are getting the alphanumeric characters error, that is not passing the WordPress function validate_username. Caps are allowed, so it must be something else.

  • Jon May

    I’m trying to find a way to block the blog page itself from being seen by users who are not logged in. Setting “block” custom field to “true” on that page doesn’t work. Neither does simply setting the default for ALL pages to be blocked — if you do that, all the pages are, in fact, blocked EXCEPT for the blog page. Any way to work around this???

  • http://yourpresenceontheweb.com Jon May

    Hi, I had posted this question on this site yesterday, but now I can’t find it. Anyway, I’m trying to “block” the blog page, so that no one can see the page itself unless they are logged into the site. Have tried several things, like adding the “block” custom field to the blog page and setting the value to “true”, but that doesn’t work: you can’t drill down into the individual posts, but you can still see the blog page itself. Is it possible to block the blog page? If so, how? Thanks.

    • http://butlerblog.com Chad

      Hi John, the plugin will show excerpts truncated at the ‘more’ tag on any summary template. If you set up a static page as a ‘posts page’ this still operates the same way.

  • Aurora

    Hi Chad
    Perhaps you could help me again. I have over 1000 subscribers now and have been exporting ‘Not exported’ data over the past few weeks. I wanted to merge them into one but realised one of the csv exports was corrupted and I don’t know how to export it again. Is there any way I can export the complete subscriber list in one go?

    • http://butlerblog.com Chad

      I am actually working on a full user export for the next release. I should have a release candidate available sometime today or tomorrow, so watch the front page of the blog for an announcement.

      The new release is mostly focused on new filter hooks (14 new hooks are in this release), but also includes a full user export option, and a couple of code fixes.

      • Aurora

        That’s fantastic, and should really help everyone. Thanks in advance Chad, and I’ll look out for your release.! :)

  • http://impx.bplaced.net Knut

    Hi Chad,

    I’m a bit new in this area. But thanks for developing this great tool!
    I try to make a forum page just accessable for users. But the forum always appears under the registration form. I tryed to hide but it only works for text, not for the forum. Hope it does make sense. Is there a chnace to hide the content for not loged in users?

    • http://butlerblog.com Chad

      There is a lot of “it depends” for that question: depending on how your forum is displayed – does it use additional theme templates? or is it a page shortcode? How is it displayed on the page?

      • http://impx.bplaced.net Eike

        Hi Chad,

        it is the bbpress plugin. The page appears with the members login and registration page and below is the forum index page, which actually should be invisable as long as the person is not longed in. The only thing what a not loged in person can’t do is commenting or posting in the forum. The members login page is always above. Thanks.

  • Derrick Knight

    I am beginning to use your plugin for our church website for our member directory. One of the things we want to maintain for each member is a medium resolution image of the member. I see you provide the ability to extend the field for the user profile but don’t provide for a URL or image uploader. Do you have any recommendation for higher resolution images for the user profile? Most of the plugins seem to be out of date. Maybe upload and reference a URL in a fixed field?

    Thanks for any insights.

    • http://butlerblog.com Chad

      Hi Derrick – I don’t really have a direct solution for you. Since the plugin was designed more with content restriction in mind rather than uploads, there is not an upload process supported. WordPress does already support avatars (specifically gravatar) based on the user’s email address, but that’s not really what you have in mind.

      There are some possibilities, one of which is if you can get the url of an image, either via another upload process or simply the user specifying that location, as long as you had the image location stored in user’s profile (specifically as an extra field which would go in wp_usermeta), then you could pull that information to display the image. If you can’t find a plugin solution for that, you’ll probably need to develop a customized solution.

      • Derrick Knight

        Chad,
        Thanks for a great membership plugin. Do you have any plans to support different membership levels? In my case, we have elders/deacons, general members and the general public. It would be nice to be able to designate a different membership level for each.
        Thanks again for all your hard work over the years.
        -Derrick

        • http://butlerblog.com Chad

          That may come in the future – but no specific plans in the project list yet.

  • evan

    Hi

    I have implemented this plugin of yours and was wondering about the following and would appreciate your help:

    1. Is it possible to completely disable/hide the dashboard for my members ie contributors?
    I have currently done this via using another plugin “Front End Users”.

    2. Is it possible to allow members ie contributors to create new post’s? I have kept trying to allow this but cant find anyway of doing it. The closest I have gotten is with “Quick Post Widget” but that looks plain and allows them to select categories. I just want to allow post on that page.

    3. Is there no WYSIWYG type editor that would allow members to be able to create a new post ie title and be able to type in text, link an attachment/url
    AND
    be able to work in comments as well?
    Why is there no such editor as default?
    I am using a plugin “Rich Text Editor For Comments” which is perfect but it does not allow the creation of new posts and works for comments only.

    4. Is it possible to get the sidebar login to match the text of the rest of the site? Currently it looks very different from the standard WP text all around it.

    Essentially what I am trying to do is allow contributors FRONTEND access only and provide them with all the tools they need to create new posts + reply to comments as easily as possible.

    • http://butlerblog.com Chad

      On 1 – 3, I’m sure there are a number of ways you could approach this, so there is no one right answer. The WP-Members plugin uses the WP default role (whatever you have set for that) when registering a new user, so whatever you do in this area will tie into that. I’m sure there are many plugins that cover each of these things.

      As for the sidebar login, it is driven by CSS just like your other widgets. You can customize the styles and there is some info on that here: http://butlerblog.com/2011/07/25/customize-the-wp-members-stylesheet/ In this case, since you are just dealing with the widget, I would probably first try just eliminating the default styles and see if your theme styles get picked up. If not, then you could customize either plugin CSS as described in that post, or add the necessary styles to your theme’s stylesheet.

  • http://theorderoftheironphoenix.com Fernando Cabbages

    This looks too good to be true. I will look into it and send you back some feedback. And is it hack-proof? If not, is there a way to add encryption ? And as far as a member’s area, is there a way to restrict registration in exchange for monetary compensation?

    • http://butlerblog.com Chad

      Nothing is ever hack-proof. But the plugin runs essentially the same as the WordPress registration process, so it is essentially as secure as WordPress. You can restrict registration by requiring that registration be approved before access is allowed.