Too many redirects after migrating site
-
I have taken over management of a WordPress site which I didn’t develop, actually having no prior experience with WordPress, although I’m very familiar with web applications in general (primarily a Java developer) and am comfortable with server management. I successfully migrated this site to a new server where it is running well.
I am now trying to set up a copy of the site for testing purposes on a different server, and have copied across the directory and database set up Apache, etc. with virtual host, and changed the site URL etc. in the options table. A straight PHP page is served fine but with anything handled by WordPress, such as the start page, I’m getting a redirect loop – the Apache access log shows repeated ‘GET /’ – until the browser gives up.
I’m trying to work out what the difference could be between this copy and the working original site and would appreciate any suggestions as to where to look. The server architecture is a little different from the original site but I can’t think why this might be a problem. Because I also have nginx running on this server, I have configured Apache to run on a different port (8040), with nginx acting as a reverse proxy in front of it (all requests which are not to /api are proxied to Apache). So, let’s say the URL is ‘
https://staging.mysite.com/
‘. This is handled by nginx and the request is proxied (forwarded) to Apache at ‘https://127.0.0.1:8040
‘. The site URL etc in WordPress (as configured in wp-config.php and or directly in the database) is ‘https://staging.mysite.com/
‘.It’s not superintuitive but it works, and given that a simple ‘info.php’ page in my site directory works fine, clearly the proxying is working as it should. It’s just that an actual WordPress page causes a redirect which then becomes an infinite loop. Any suggestions as to why this might be?
- The topic ‘Too many redirects after migrating site’ is closed to new replies.