I have a Wordpress site on a VPS which keeps getting attached on xmlrpc and wp logins. As part of combatting this I password protected the wp-admin directory (via Cpanel 'Directory Privacy') - but when I go to test it I get browsers not loading the page due to 'too many redirects' (Safari and Chrome). As a plan B I've installed a WP plugin to rename the wp-admin address, but logging in to that redirects back to the same login page instead of successfully going to the dashboard, which also seems like a redirection. Any possible solutions or logs I can look in that might shed some light?
The "too many redirects" error can happen depending on server settings. The way to fix it is:
- Find the .htaccess file in your Wordpress installation (by default it'll be in the document root).
Edit this file, by adding the below line to it:
ErrorDocument 401 default