Running a successful membership site is all about the member experience. If your site is difficult to navigate or your content poorly organized, members may lose interest, which means less engagement—and more churn.

One of the things you can do to improve the user experience is to automatically redirect members back to the protected content they were viewing right before they logged in. This enables them to log into your site without interrupting their engagement with your content.

In this tutorial, we will guide you through how to do this, so that when members click “Log In” on a piece of members-only content, they will be redirected back to that same URL immediately upon logging in.

Redirect members to referrer when viewing locked content

Login Redirection Overview

In WordPress, login redirection is based on the user’s role. However, Paid Memberships Pro redirects all users to the Membership Account page regardless of their role.

In order to change this default behavior, you’ll need to set the referring URL in the messages displayed on protected posts or pages.

Check out our documentation on redirect logic in PMPro to better understand the default redirects in the plugin.

Protected Content Messages in PMPro v3.1+

In Paid Memberships Pro v3.1, we updated the default protected content messages to always redirect to the referring page. If you’re running PMPro v3.1 and have not customized your protected content messages, you are good to go.

Protected Content message with login and redirect link in PMPro v3.1+

If you have customized these messages, refer to the documentation on legacy settings for customizing messages here.

Note that if you have other plugins installed that are supposed to redirect members on login, those settings may override this. Premium members can open a ticket in our support area for help with login redirects.

Redirect Login by Membership Level

This tutorial shows you how to set up redirection back to the referring page, but you can also redirect members to pages based on their membership level. You can even use both together, which would redirect member based on their membership level if no referrer is passed to the login page URL from WordPress, Paid Memberships Pro, or another plugin.

Free Course: Membership Site Development—The Basics

Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.

Featured Image for Membership Site Development Course: The Basics
Was this article helpful?
YesNo