Sometimes you need to test what a user is seeing.
This snippet lets your IP address login as anyone.
You need to enter a password just so it isn’t empty, but it can be anything. This hook says any password is a match if it’s from your IP address.
add_filter('check_password', function( $match ){ return $_SERVER['REMOTE_ADDR'] === 'YOUR_IP_ADDRESS' ? true : $match; });
If you want to further secure it with a master password:
add_filter('check_password', function( $match, $password ){ return $password === 'mydumbpassword' && $_SERVER['REMOTE_ADDR'] === 'YOUR_IP_ADDRESS' ? true : $match; }, 10, 2 );