WordPress.org

Forums

How Many Pages Is Too Many? (8 posts)

  1. bakert
    Member
    Posted 9 years ago #

    Approximately 400 pages is causing "maximum execution time exceeded" timeouts in the admin section on "Manage Pages". Admittedly my server is a slow old beast (PII-300 with 384MB RAM) but is that normal? It copes with (most) other stuff OK. What's the practical maximum for WordPress?

    (Yes, I can increase the standard PHP timeout from 30 seconds but then I'll be waiting more than 30 secs every time I want to hit that screen - too long!)

    Thanks, Tom.

  2. skippy
    Member
    Posted 9 years ago #

    You might look into a pagination plugin for the admin screens, which will limit the number of pages presented in a list at one time.

    I haven't used the Enhanced View Plugin myself, so maybe it won't solve your problem; but it's worth trying.

  3. bakert
    Member
    Posted 9 years ago #

    Enhanced View only does Posts, not Pages otherwise it would be perfect. The author has given up trying to get it to work with Pages. Good idea though!

  4. bakert
    Member
    Posted 9 years ago #

    In the end I have reduced load time from a few minutes to 10 seconds (still too long!) by altering the page_rows function in admin-functions.php.

    I commented out the line

    if ($post->post_parent == $parent) {

    and its corresponding }.

    And also commented out this line:

    page_rows($id, $level + 1, $pages);

    immediately above the close curly brace in that loop.

    The result is that pages that are "sub pages" of another page no longer show that they are sub pages (with preceding dashes) on the manage pages screen or display in the "right" place under the master page but it means that the page_rows routine is executed only 360 times not 12,960 times (360^2).

    This function doesn't seem to be called from anywhere apart from edit_pages() so I guess I am safe.

    The moral is ... don't have subpages! It increases the number of loops of page_rows exponentially. I dread to think what happens if you have subsubpages (360^3 > 46 million)!

  5. bakert
    Member
    Posted 9 years ago #

    Follow up to this ...

    I upgraded my server from a PII-300 with 384MB RAM to a PIV-3.4GHz with 2GB RAM. This has obviously made everything much faster. This page still takes 3 seconds WITH my adjustment above and MORE than 30 seconds (but not much more) with the adjustment removed.

    So really, anyone with more than about 100 pages must be seeing problems like this. Unless there's something messed up in my config.

    I'm sure that loop can be written vastly more efficiently (using a subquery on the initial SQL so that the pages are in the order you want to write them out in in the recordset?) That would make the pages at least 10 times faster - how do you submit a patch to wordpress?

  6. James Huff
    Volunteer Moderator
    Posted 9 years ago #

    How fast do the pages load if you disable all of your active plugins?

  7. Ming
    Member
    Posted 9 years ago #

    Patches can be filed at trac.wordpress.org. You'll need to login with your support forum username.

  8. mark0x
    Member
    Posted 8 years ago #

    Hi,

    I realise this is an old topic but it still ranks highly for people looking for a solution to the timeouts experienced with a huge number of pages (i.e. using WordPress as a CMS)

    I wrote a blog topic on the subject of speeding up the WordPress 'Manage Pages' admin page:

    WordPress: Speed up ‘Manage Pages’ admin page

    Hopefully it will be useful to other looking for a solution to this problem

Topic Closed

This topic has been closed to new replies.

About this Topic