Report this

What is the reason for this report?

Better solution to prevent Wordpress ERR_TOO_MANY_REDIRECTS (only appearing at wp-admin)?

Posted on September 8, 2018

Is there a way to prevent this error, ERR_TOO_MANY_REDIRECTS from appearing at /wp-admin after certain common installation conditions (described below). Here is what I did:

I pointed my DNS to Cloudflare.

Then on Cloudflare I created an A Record (@) pointing to my Digital Ocean droplet IP address, as well as a www CNAME Record aliased to that A (@) Record.

I set the SSL on Cloudflare to “Flexible” (and did not install SSL on my digital ocean droplet.)

I used the Wordpress One-Click installer to spin up a Wordpress site using the directions here:

https://www.digitalocean.com/community/tutorials/how-to-use-the-wordpress-one-click-install-on-digitalocean

Following the completion of the Wordpress install, I was getting ERR_TOO_MANY_REDIRECTS (but only when trying to log in at /wp-admin. The front of the site showed no errors).

In order to correct this error, I needed to change the WordPress Address (URL) and the Site Address (URL) at Settings - > General in the /wp-admin (backend) of the Wordpress site. However I couldn’t login to the admin of the Wordpress site in order to do this, due to the ERR_TOO_MANY_REDIRECTS error.

I’m an FTP user, so I used FileZilla to add the settings below to the file wp-config.php which corrected the problem and allowed me to log in at /wp-admin (hooray!)

In FileZilla, I right-clicked on remote file, then clicked View/Edit (I did it this way, because I found that if I downloaded, edited, and then re-uploaded the file it changed the “owner” of the file which cause other problems.)

This opened the file in my text editor (I use Edit Pad Pro.)

Then I added the following to the end of the wp-config.php:

define('WP_HOME','http://www.your-site.com');
define('WP_SITEURL','http://www.your-site.com');

Using http not https

and

Making sure to use the www

I clicked Save in my local file editor, then went back over to FileZilla which then showed a prompt to Upload the file back to the server.

I clicked Yes, and checked to make sure the “Owner” of the file hadn’t changed.

This worked for me.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.