Login Page Not Working
Below are some common issues that we see with the MemberPress login page and what you can do to fix them:
User is asked to solve a math problem, but after solving, user is sent back to the login page
This issue is related to a security feature of Jetpack. To resolve the issue you will need to disable Jetpack's " Block suspicious looking login attempts" setting under the Security options.
Please note that this issue is characterized by your users being sent to a new page after entering in their login credentials where they are prompted to solve a simple math problem, but despite correctly solving it they are redirected back to the login page. This is NOT related to our Math Captcha add-on.
User is taken to a 404 error page after logging in
This issue is likely caused by not having a correctly formatted URL OR a unpublished page/post/etc. entered into your login redirect settings of MemberPress. There are two places to check:
- Globally, in the MemberPress > Options > Account tab > Login & Logout section > URL to direct member to after login.
- Per-membership in the MemberPress > Memberships > (click edit on your membership) > Membership Options > Advanced tab > Custom Login Redirect URLs > Default Login Redirect URL OR any custom URL added in the Add Custom Login Redirect URLs section.
When checking these URL's be sure to check these items:
- The URL is either a full URL to your site or the slug (e.g.: if the page is
https://www.yoursite.com/cool-stuff/cool-page/you have it entered as that or as
/cool-stuff/cool-page/) of an existing and published page/post/etc. on your site.
- The URL follows the structure of the rest of the URL's on your site. For example, if your site doesn't use "www" then you should not have that included. To avoid this issue to begin with, just use the slug of the URL (see example above).
User is getting stuck in an infinite redirect loop that ends in an error page
The most common cause of this issue is caused by a combination of setting the unauthorized redirect URL setting to the login page (you should never do this), the user who is logging in does not have an active subscription AND you having your login redirect URL (see locations for these settings above in the section) set to a protected page. In WordPress, if a logged in user visits the login page, they are automatically redirected away from the login page and sent to whatever page you have set as your login redirect URL. Therefore, if the user is able to login, but doesn't have an active subscription to access the page you are trying to send them after login, they are sent to the login page (your unauthorized page), which will again redirect them because they are logged in and so on and so on . . . creating an infinite loop!
To fix this, you should make note of the following points:
- You should NEVER set your login page as your unauthorized redirect url. Follow the instructions here to setup an unauthorized redirect page that will prevent this issue.
- It is best practice to have your login redirect URL set to a page that is NOT protected by a rule in MemberPress if possible. This will help avoid confusion for you and your users as to whether or not they can login or if it's a subscription issue.
User logs in and afterward visits a page that seems to have logged them out
When getting this issue, you'll notice that your users complain about being logged in one minute, and the next they have been logged out. Either they are seeing your unauthorized page due to not being logged in or are just being asked to log in again.
With this issue, it is likely being caused due to a difference in security protocols on your login page and other WordPress pages. WordPress creates a login session cookie that tells your site if the user is logged in or not as they navigate around your site. This cookie is dependent on the security protocol the login page from which the user logged in. Therefore, if the user logs into a page using a security protocol (has https:// in the URL) then visits a page that does not (has http:// or nothing front of the URL) then WordPress will think the user is logged out. The results will be the same vice versa.
To fix this issue, we recommend that you set your entire site up to completely use a set security protocol or not. Please contact your host regarding setting up a security protocol on your site as MemberPress does not provide that.