• Hey guys! Having a weird issue on a site. I’m pulling up a loop of posts from a custom post type, and I’ve tried using both ‘numberposts’ and ‘posts_per_page’. If I set the number to over 1600, the site throws a 500 error. It does the same thing if I set the numberposts to -1

    'posts_per_page' => -1

    Anyone have any idea of why?

Viewing 3 replies - 1 through 3 (of 3 total)
  • My guess (based on info provided) is 1600 crashed your server and -1 is not supported…did you try maybe 100? 25?

    Thread Starter Jess

    (@jessn)

    Yeah 100 and 25 work fine – actually I can increase the number without problem until I get to 1660. What I want to do is pull up all posts, even though there are a lot, but it’s looking like that’s too much work for the server at that point?

    but it’s looking like that’s too much work for the server at that point?

    That would be my guess (and you might want to check that also when many visitors hit at once)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Posts Per Page giving 500 error’ is closed to new replies.