What is the maximum number of posts a WordPress loop can work with?

There is no inherent technical limitation to how many posts can WP loop query. However there is always resources (CPU and memory) ceiling of specific server and configuration.

  1. If you are leaking/eating memory in any way (for example adding up some results with every post iteration) it will get exhausted quickly.
  2. WP query class (wpdb) drags all of the results into memory. For super large results sets you might need to switch to iterating via lower level MySQL access functions (WP backup plugins tend to work in that way).