Here is my use case: I would like to create a WP SaaS for restaurant. I will maintain a 'white label' WP Multisite install so I do not need to upgrade WP/Plugins n times.

Restaurant owners can sign up and create their site while their customers can login and reserve a seat or place a to go order. This gives me 3 users types:

  • My company restaurant.com (not really) has admins who get to see everything, they can login anywhere as far as I care
  • Each individual company owner has their own login to their site number1.com in Detroit spicythai.com in LA pizzashack.com in NY, etc. They will need to REGISTER on restraunts.com but after they have their personal site going they can login at either restaurant.com or spicythai.com or both, that doesn't matter to me
  • Customers of each of those companies only care about that individual restaurant. When Joe User wants Thai food he want to register/login at spicythai.com oblivious of any other site


Anyone who clicks a link on spicythai.com/wp-login.php gets redirected to restaurant .com/wp-login.php. This is very confusing to be taken to a site marketing restaurant owners when all they want is Thai food.

Line 701 of wp-login.php has the following: https://github.com/WordPress/WordPress/blob/master/wp-login.php#L701

case 'register' :
    if ( is_multisite() ) {
         * Filter the Multisite sign up URL.
         * @since 3.0.0
         * @param string $sign_up_url The sign up URL.
        wp_redirect( apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ) );

If I comment out this if block, everything works great. A user of spicythai.com never sees any other site and login/registers directly at spicythai.com/wp-login.php

However... editing the core files is "bad pie".

Also, adding a add_filter( 'wp_signup_location', ... ) doesn't work because the signup_location I want them on is the one they are currently trying to click to. So you get stuck in a redirect loop until your browser says "ok thats enough, this site doesnt work"

Do I have any way forward that is "kosher" for overriding this behavior?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.