Title: WordPress Infinite Loop
Last modified: March 31, 2021

---

# WordPress Infinite Loop

 *  Resolved [stunningmuffin](https://wordpress.org/support/users/stunningmuffin/)
 * (@stunningmuffin)
 * [5 years ago](https://wordpress.org/support/topic/wordpress-infinite-loop/)
 * Hi all,
 * **Architecture:**
 *     ```
       www.example.com
   
       webservers---subnet1---
                             |---example.com-aws-elb
       webservers---subnet2---
       ```
   
 *     ```
       cms.example.com
   
       webservers---subnet3---
       		      |---example.com-aws-elb
       webservers---subnet4---
       ```
   
 * We performed a fresh installation of WordPress using cms.example.com and it works
   as expected.
    No plugin installed or enabled. No theme installed (default one
   used). Default .htaccess with no customization, no additional configuration, 
   WordPress is out of the box.
 * The WordPress URL (WP_HOME) is cms.example.com.
    The Site URL (WP_SITEURL)is 
   cms.example.com.
 * We keep the browser developer tools opened and there is no error there.
 * With this configuration, we can add new posts and see the content without difficulties.
 * **Our setup:**
 * On the Load Balancer, example.com-aws-elb, we created a new rules to redirect
   a specific path, blog, to cms.example.com webservers.
 * So when we hit [http://www.example.com/blog](http://www.example.com/blog), we
   reach cms.example.com webservers.
    At this point, we can still post but when 
   we land on a 404 wordpress page (Nothing here).
 * To solve this problem, we update the Site URL (WP_SITEURL) in the WordPress settings
   from cms.example.com to [http://www.example.com/blog](http://www.example.com/blog).
 * Now, reaching [http://www.example.com/blog](http://www.example.com/blog) gives
   WordPress index page as expected and it seems like everything works (no issues
   in the browser dev tools).
 * However, when we try to add or edit a post with this configuration, the post 
   edit page load and doesn’t respond anymore.
    Indeed, when we look at the browser
   dev tools, we can see that there is an infinity requests loop.
 * This looks like:
 *     ```
       "GET /blog/wp-json/?context=edit&_locale=user HTTP/1.1" 403 94 "https://cms.example.com/" "user-agent-stuff-here"
       "OPTIONS /blog/wp-json/wp/v2/users/?who=authors&per_page=100&_locale=user HTTP/1.1" 200 5865 "https://cms.example.com/" "user-agent-stuff-here"
       "GET /blog/wp-json/wp/v2/users/?who=authors&per_page=100&_locale=user HTTP/1.1" 403 94 "https://cms.example.com/" "user-agent-stuff-here"
       "OPTIONS /blog/wp-json/wp/v2/users/me?_locale=user HTTP/1.1" 200 4628 "https://cms.example.com/" "user-agent-stuff-here"
       "OPTIONS /blog/wp-json/?context=edit&_locale=user HTTP/1.1" 200 204 "https://cms.example.com/" "user-agent-stuff-here"
       "GET /blog/wp-json/wp/v2/users/me?_locale=user HTTP/1.1" 403 94 "https://cms.example.com/" "user-agent-stuff-here"
       "GET /blog/wp-json/?context=edit&_locale=user HTTP/1.1" 403 94 "https://cms.example.com/" "user-agent-stuff-here"
       "OPTIONS /blog/wp-json/wp/v2/users/?who=authors&per_page=100&_locale=user HTTP/1.1" 200 5865 "https://cms.example.com/" "user-agent-stuff-here"
       "GET /blog/wp-json/wp/v2/users/?who=authors&per_page=100&_locale=user HTTP/1.1" 403 94 "https://cms.example.com/" "user-agent-stuff-here"
       "OPTIONS /blog/wp-json/?context=edit&_locale=user HTTP/1.1" 200 204 "https://cms.example.com/" "user-agent-stuff-here"
       "OPTIONS /blog/wp-json/wp/v2/users/me?_locale=user HTTP/1.1" 200 4628 "https://cms.example.com/" "user-agent-stuff-here"
       "GET /blog/wp-json/wp/v2/users/me?_locale=user HTTP/1.1" 403 94 "https://cms.example.com/" "user-agent-stuff-here"
       "GET /blog/wp-json/?context=edit&_locale=user HTTP/1.1" 403 94 "https://cms.example.com/" "user-agent-stuff-here"
       ```
   
 * We cannot add any new content, it is very slow and even if we can go through 
   we get this message “Publishing failed. You are probably offline.”.
    This behaviour
   renders WordPress useless.
 * What cause this issue?
    How can we solve this? Is this achievable with our architecture?
 * Thank you very much for your help!
    -  This topic was modified 5 years ago by [stunningmuffin](https://wordpress.org/support/users/stunningmuffin/).
    -  This topic was modified 5 years ago by [stunningmuffin](https://wordpress.org/support/users/stunningmuffin/).
    -  This topic was modified 5 years ago by [stunningmuffin](https://wordpress.org/support/users/stunningmuffin/).

The topic ‘WordPress Infinite Loop’ is closed to new replies.

## Tags

 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [stunningmuffin](https://wordpress.org/support/users/stunningmuffin/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/wordpress-infinite-loop/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
