WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently looking at why the archive and search pages take so long to use, and have found that the bulk of processing time is spent on the query_posts that is called before the template has even been called.

Does anyone have any ideas how you can either stop WP_Query from being called on such a page, and then manually do it later, or how to improve the time it takes for these processes to occur?

It's also worth noting that it seems that it's to do with caching of postmeta that is taking the most time to load.

Load time of an archive page

share|improve this question
There is not enough information to answer this question. Performance questions are complicated. What are your server stats? How many results are you pulling for a page? Do you have any plugins that might effect the query? Is this a custom post type? What do you mean by "do it later"? Are you running something like mem_cached? Or a WordPress caching plugin? – s_ha_dum Oct 19 '12 at 14:03
We need to see the code you're using for the template. Also please redo this test with TwentyEleven activated and all plugins deactivated in a local, plain, vanilla install. Else it's impossible to reproduce your setup. – kaiser Oct 19 '12 at 14:36
My question really is about what might lead to this significant load time before the theme files have even been requested? This would imply that it would not be due to the theme (nor functions.php) so could it be plugins or alternatively a large database? Any ideas? – Ollie Oct 19 '12 at 20:25
And turn off W3. – Wyck Oct 20 '12 at 1:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.