• CLICK HERE to find my website that is running Admired theme.

    I have them setup as pages and not posts for a reason and didn’t think I would run into the problem I am currently. Basically the more pages I add, the slower my site goes. I now have 1000+ pages and the server has started to overload, everything moves VERY slowly, etc. I received the following response from my hosting service that actually makes a lot of sense:

    Tracing the processes, and testing by temporarily commenting out some code, I was able to determine that the vast majority of the delay, about 8 seconds, was coming from the following line in /home/mitmold/public_html/moldinspectionandtest.com/wp-content/themes/admired/bottom-menu.php:

    wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’, ‘menu_class’ => ‘sf-menu’,’fallback_cb’ => ‘admired_page_menu’ ) );

    This just calls the WordPress API function to create the navigation menu, however that runs the following query:

    SELECT * FROM wp_posts WHERE (post_type = ‘page’ AND post_status = ‘publish’) AND ( ID <> 7 ) ORDER BY menu_order,wp_posts.post_title ASC;

    This returns the entire contents of all 1039 pages on the site. The database returns this data quickly, but WordPress takes a very long time to process it, and allocates more memory with nearly every row of the results.

    Is there any way to work around processing all the content and only dealing with the page that is trying to be viewed?

    Any help is appreciated!

  • The topic ‘Too Many Pages=Long Load Time’ is closed to new replies.