How to find the login page when the WPS Hide Login plugin is used
An unpleasant situation: you type /wp-admin/ or /wp-login.php to get into the dashboard, and you are redirected to some page, but not to the login form. Usually the default login page is hidden for one purpose, security: bots cannot brute-force the login form if they do not know where it is. There are many ways to hide it, with or without plugins. In this article we look at the case when a project uses the WPS Hide Login plugin and you forgot the changed login address.
Problem: How to find the login page address set by WPS Hide Login?
Solution: It is relatively simple. Everything depends on what you prefer and what access you have. The plugin stores the address in the option whl_page.
1. Access to the files
Go to the /wp-content/plugins/ folder and rename the wps-hide-login folder, for example to wps-hide-login-temp. WordPress cannot find the plugin and deactivates it, and the default login page /wp-login.php works again.
After you log in, the address is in Settings → General, at the bottom, in the WPS Hide Login section. Rename the folder back and activate the plugin.
2. Access only to the theme files
Add this code temporarily to /wp-content/themes/theme_name/functions.php. It shows the login address at the bottom of the site pages:
<?php
// Temporary: show the hidden login page URL. Remove it right after use!
add_action( 'wp_footer', function () {
echo '<h4>WordPress hidden login page URL: ' . esc_url( home_url( '/' . get_option( 'whl_page' ) . '/' ) ) . '</h4>';
} );
Open any page, copy the address, and remove the code: otherwise anyone can see it.
3. Access to the database
Run this SQL query in phpMyAdmin (the table prefix may differ from wp_):
SELECT option_value FROM wp_options WHERE option_name = 'whl_page';
If it returns my-login, the login page is https://example.com/my-login/. With WP-CLI it is one command: wp option get whl_page.
Good luck! 😉
NOTE: A hidden login page only reduces the noise from bots. Strong passwords and two-factor authentication still matter.