Ready to get started?Download WordPress


Lockdown WP Admin
Works, but cannot logout (4 posts)

  1. Xaliber
    Posted 2 years ago #

    It works, but the problem is I cannot logout. Apparently because all links containing wp-login.php is rewritten to my custom login URL.

    I tried using the default logout URL ( http://mysite.com/wp-login.php?action=logout&_wpnonce=fed30f7935 ), but still I cannot log out.


  2. Sean Fisher
    Plugin Author

    Posted 2 years ago #


    The plugin is designed to change every URL that links to wp-login.php and changes it to the login base you specified.

    So if your base is "login-base", your logout URL would be "login-base?action=logout". It should still work because WordPress uses wp-login.php to log the user in and log the user out.


  3. Xaliber
    Posted 2 years ago #

    That's weird, because the logout URL is using my base but it still doesn't work. My login base is "access", so the URL is: http://mysite.com/access?action=logout&_wpnonce=fed30f7935

    But still, I cannot logout. Instead, what appears is an error screen saying "object not found"

  4. Xaliber
    Posted 2 years ago #

    Good news! I have found a way how to fix this issue. Found from here:

    Basically we should also changes the links from wp-logins.php to /your-own-login-link.

    After installing the plugin, edit your theme functions.php, then add this filter:

    add_filter('site_url',  'wplogin_filter', 10, 3);
    function wplogin_filter( $url, $path, $orig_scheme )
     $old  = array( "/(wp-login\.php)/");
     $new  = array( "your-own-login-link");
     return preg_replace( $old, $new, $url, 1);

    Pay attention:Make sure to match your-own-login-link to the one you made in WP Lockdown. Now it works perfectly!

    In case you haven't noticed this, I guess you should add this to your code, Sean! ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic