The MU forums have moved to WordPress.org

Want to move wp-signup.php to its own directory (how link?) to password-protect (2 posts)

  1. wpmuidiot
    Member
    Posted 16 years ago #

    I think moving wp-signup.php to its own directory and then password-protecting the directory is the best way to limit MU signups. How would I do that?

    So instead of /wp-signup.php being in the same directory as the rest of the MU files, it'd be
    /signup/wp-signup.php

    wp-signup.php has links like this:
    require( dirname(__FILE__) . '/wp-load.php' );

    ...How do I change those links to point to one folder below? By changing all those references in wp-signup.php, would it work?

    Has anyone done this before? Any help is appreciated, thanks.

  2. wpmuidiot
    Member
    Posted 16 years ago #

    Never mind, I guess it's unnecessary...

    I found a simple one-page PHP password protection script to put on the wp-signup.php page and just leave it where it is.

    If anyone's looking for something like that, here's a link:
    http://www.codemiles.com/php-tutorials/php-password-protect-a-page-t1418.html

    ...I put all of the password script part of it at the very top of the wp-signup.php page (The <?php of the first line is redundant since it's already at the top of wp-signup.php, so I didn't copy that part over)

    Under the "This is the protected page. Your private content goes here" line I left the entire wp-signup.php page, and it's important to note that you DO need to put this final code at the very very bottom of wp-signup.php (I guess to "close the tags") or else you get an error message:

    <?php
    }
    ?>

    Hope that helps somebody.

About this Topic

  • Started 16 years ago by wpmuidiot
  • Latest reply from wpmuidiot