• I’m looking for a way to limit what pages get queried when certain links are clicked. For instance, in my situation, I have 50 parent pages but about 15000 child pages under the various parent pages. My homepage will have links to all 50 parent pages but I’ve noticed after adding the 15000 child pages that it has slowed wordpress down quite a bit. Is there any way to limit the wordpress search to only the parent pages (and exclude all of the child pages) when the specific link is clicked on the homepage? Would that even help speed up the load time? My though process is that if it only has to search through a 50 page loop for a specific page instead of a 15000 page one, it should help the load time significantly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • What does the query look like to display the 50 pages?

    Caching should help at any rate if you don’t yet have it installed: http://ww.wp.xz.cn/extend/plugins/w3-total-cache/

    Thread Starter dscouron

    (@dscouron)

    Thanks for the heads up on the caching. I hadn’t thought that through. After I submitted the topic though, I realized that specifically in this situation, there’s no query, it’s just a static link. It’s probably just slow because of the fact that there are over 15000 total pages that it has to go through in the db to get to the right one. Is it just a situation where with that many pages, it’s going to slowdown no matter what I do? Is there anything else that I’m possibly overlooking (other than caching) that could help?

    Thanks

    You can delete post revisions: http://www.mydigitallife.info/2008/07/22/how-to-delete-existing-wordpress-post-revisions-storedsaved/

    There’s also plugins that do this (perhaps more safe).

    Give you database a little optimization (also plugins for that).

    Move to a host like wpengine.com that has a ton of optimizations in the hosting environment.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Limiting what pages WordPress queries’ is closed to new replies.