Title: [Plugin: Lockdown WP Admin] Works, but cannot logout
Last modified: August 20, 2016

---

# [Plugin: Lockdown WP Admin] Works, but cannot logout

 *  [Xaliber](https://wordpress.org/support/users/xaliber/)
 * (@xaliber)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-lockdown-wp-admin-works-but-cannot-logout/)
 * 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](http://mysite.com/wp-login.php?action=logout&_wpnonce=fed30f7935)),
   but still I cannot log out.
 * [http://wordpress.org/extend/plugins/lockdown-wp-admin/](http://wordpress.org/extend/plugins/lockdown-wp-admin/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Sean Fisher](https://wordpress.org/support/users/sean212/)
 * (@sean212)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-lockdown-wp-admin-works-but-cannot-logout/#post-2181956)
 * Hi,
 * 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.
 * Sean
 *  Thread Starter [Xaliber](https://wordpress.org/support/users/xaliber/)
 * (@xaliber)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-lockdown-wp-admin-works-but-cannot-logout/#post-2182068)
 * 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](http://mysite.com/access?action=logout&_wpnonce=fed30f7935)
 * But still, I cannot logout. Instead, what appears is an error screen saying “
   object not found”
 *  Thread Starter [Xaliber](https://wordpress.org/support/users/xaliber/)
 * (@xaliber)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-lockdown-wp-admin-works-but-cannot-logout/#post-2182357)
 * Good news! I have found a way how to fix this issue. Found from here:
    [http://wordpress.org/support/topic/how-to-change-from-wp-loginphp-to-login?replies=4](http://wordpress.org/support/topic/how-to-change-from-wp-loginphp-to-login?replies=4)
 * 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!
   😉

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: Lockdown WP Admin] Works, but cannot logout’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/lockdown-wp-admin.svg)
 * [Lockdown WP Admin](https://wordpress.org/plugins/lockdown-wp-admin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lockdown-wp-admin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lockdown-wp-admin/)
 * [Active Topics](https://wordpress.org/support/plugin/lockdown-wp-admin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lockdown-wp-admin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lockdown-wp-admin/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Xaliber](https://wordpress.org/support/users/xaliber/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-lockdown-wp-admin-works-but-cannot-logout/#post-2182357)
 * Status: not resolved