I put together a quick WordPress site locally using MAMP, then checked it into an SVN repo. I then checked it out on to my development server.
I didn\'t change anything
I had a similar issue in my case it was due to restoring a db script that was created with WP Migrate DB. The script had merge tags in like "## DEV URL ##" which i needed to fix before running the script on mysql and pointing the wp-config.php to the correct database.
My problem was that the hardisk was full. Trying to log into the wordpress administration panel was redirecting me to wp-login.php. I was able to log in again the moment I deleted some files.
I was getting DoS pages when trying to publish in my WP site. I found advice that changing permissions in the function.php file to 600 could solve the issue, also to add to that file a script snippet . It was a WP help page. I was able to get to the publishing in a work-around way. Still have the DoS when I try to open the editor.
In my case it was Apache's DirectoryIndex issue. The wp-admin was being accessed by wp-admin/index.php but not with wp-admin and showing ERR_TOO_MANY_REDIRECTS.
It sounds like Apache's DirectoryIndex may be set "incorrectly". Try resetting this at the top of your .htaccess file:
DirectoryIndex index.php
See the full answer here. Can't access admin dashboard with wp-admin without /index.php after it
If you are useing Cloudflare, from SSL/TLS tab of your Cloudflare account, select Full encryption. It will solve the issue.
If you're using Cloudflare you might want to try adding this to the TOP of your wp-config.php file:
define('WP_SITEURL', 'https://www.example.com');
define('WP_HOME', 'https://www.example.com');
define('FORCE_SSL_ADMIN', true);
define('FORCE_SSL_LOGIN', true);
if(isset($_SERVER['HTTP_CF_VISITOR']) && strpos($_SERVER['HTTP_CF_VISITOR'], 'https')){
$_SERVER['HTTPS']='on';
}
It's important that you add it to the top of the wp-config.php file or you'll end up with "Sorry, you are not allowed to access this page" error messages.
Credit: https://www.meltajon.com/dev/wordpress-wp-admin-redirect-loop-with-cloudflare-ssl