WP Discourse login page path

@simon I have a similar situation to this:

I want Wordpress to be the provider (the authentication come from Wordpress to Discord), and I am able to accomplish this, but the problem is that for the admin page I still want to be able to go to www.mysite.com/wp-admin and have the admin sign in there to do Wordpress maintenance and tha is not happening because now anytime anyone types mysite.com/wp-admin it takes them to a login page that is being managed by another plugin that I use.

So what I want is the following:

If anyone types discourse.mysite.com or get to my discourse through a link they get presented with a customized login page.

At the same time if anyone types mysite.com/wp-admin it takes them to the normal Wordpress Admin login. How do I accomplish this?

Thanks so much.

1 Like

On the WP Discourse SSO Provider settings page there is a ‘Path to your Login Page’ setting. It sets the login path that is used for SSO. Try entering the path to the login page that you want users to be redirected to when they login through discourse.mysite.com. The setting takes a path, not a full URL. It should look something like this: /my-account.

This should allow users who visit /mysite.com/wp-admin to be redirected to /wp-login.php, and users who initiate login visiting your forum to be redirected to your custom login page.

5 Likes

Thanks so much, @simon.

I did this and for my /login path (which is the customized login I was referring to) and it works great. The problem here is that it is redirecting even those that type /wp-admin to /login, and I was just hoping to have 2 different paths.

  1. If user types on the browser either /login or discourse.mysite.com then redirect to :arrow_right: /login
  2. if user types /wp-admin it simply stays there and log in through there. But what is happening instead is:
    2a. /wp-admins redirects to :arrow_right: /login and once completed re-direct back to :arrow_right: /wp-admin.

The general idea is to have all regular users go through /login and all admins through /wp-admin.

Thanks for your help.

Check to see if the plugin you are using to create the login page at /login is overriding the WordPress login URL. By default, the login URL is at /wp-login.php.

Is there any how-to manual here on how to create WP page as front/login page?

Hey there @ValGun, could you explain a bit more what you mean? Are you trying to do the same thing as described in this topic? If so, have you tried the suggested solution?

1 Like