WordPress.org

Ready to get started?Download WordPress

Forums

Posts_per_page= if more than 150+ is dosen't work (10 posts)

  1. mubojason
    Member
    Posted 2 years ago #

    i will use code like to display all posts in one page,
    <?php query_posts("posts_per_page=-1"); ?>
    but it doesn't work, display blank of that part;

    if i change the number like
    <?php query_posts("posts_per_page=120"); ?>

    it works right to display 120 posts;

    and if the number more than 150, like
    <?php query_posts("posts_per_page=180"); ?>

    it doesn't work...

    is something wrong?

  2. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    You are then likely creating a page that is too large (in bytes), I would think you would have server issues when many visitors try to load such large pages at same time. 10 posts per page is good if posts are text and less if heavy with images - then add a paging plugin if pagination is not included with theme.

  3. mubojason
    Member
    Posted 2 years ago #

    THANKS for replay;
    but i get the same problem, and find out to Solve it:

    ~/wp-includes/default-constants.php
    #line 23:

    'WP_MEMORY_LIMIT','32M'

    change the number more than you need,
    like 64M or more;

  4. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    And the pages output are not large?

  5. mubojason
    Member
    Posted 2 years ago #

    it output fast;
    my site now have about 300posts,
    output just less 5sec;

    i changed the MemoryLimit 32to 64M now;

    This problem has been solved

  6. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    How long does it take your customers on DSL (or less) to load these pages? That is very many posts for one page.

  7. mubojason
    Member
    Posted 2 years ago #

    i just create a page for update Custom Meta and some date for all post;

    that page just for admin or manager, not for any user;

  8. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    Well that helps clarify for others that so many posts per page is not recommended as it can cause high server loads.

  9. mubojason
    Member
    Posted 2 years ago #

    yes i understand

  10. rahulword9895
    Member
    Posted 1 year ago #

    now am facing same problem.i changed

    ~/wp-includes/default-constants.php
    #line 23:

    'WP_MEMORY_LIMIT','64M'.It doesnt show all post

Topic Closed

This topic has been closed to new replies.

About this Topic