We completely disabled the wp-login.php for security reasons.
But we would like to allow users to log out, but this requires the wp-login.php
So how could we write our own logout page that does not involve using wp-login.php
?
We completely disabled the wp-login.php for security reasons.
But we would like to allow users to log out, but this requires the wp-login.php
So how could we write our own logout page that does not involve using wp-login.php
?
You must be logged in to post a comment.
Just have a page – like
wp-logout.php
– that runssession_destroy()
or better yet,
wp_logout()
(wp manual)Albeit, I should offer an alternative to completely disabling that…
You could, for example, have a whitelist of IP’s – and in your
wp-login.php
have:Alternatively, you could just store the whitelist in an array that comes right before that…
$whitelist = array("123.456.789.100", "98.87.65.54"); //etc