Support » Fixing WordPress » WordPress and server load

  • I have a website that I’m admin-ing (, and it gets 25,000 to 40,000 visits per month. The hosting provider has informed me that database load from this site is *extremely* high, and I’m wondering what sorts of tips/tricks you guys might have to help reduce the database load.

    I know that reducing the # of queries should reduce load, but what sorts of things initiate database queries? Does having two different blog categories tagged separately mean two queries?

    Any info you guys have on WP optimization in general would be *greatly* appreciated

Viewing 9 replies - 1 through 9 (of 9 total)
  • Not sure, but it may help if you didn’t have so many posts/articles on one page.

    Break it up into 10 article/post pages.

    Edit: your site is already pretty bare-bones. Maybe it’s time to get your own server ?

    You can always put this tags in your footer
    <?php echo $wpdb->num_queries; ?> queries. <?php timer_stop(1); ?> seconds.
    to check the number of queries. Also, search for WP Cache and query optimization.

    You could also look into caching your pages (if you can live with a X minute delay). Check out the wp-cache plugin.

    Edit: moshu beat me to suggesting the wp-cache plugin.

    Always start with the plugins. Which ones do you have loaded? Any statistic plugins? Since you are only dealing with database usage, you can ignore plugins that modify content on the fly, but look at those plugins that store information back into the database.


    Okay….slapped a meter on it….*42* queries. Isn’t that the answer to life, the universe, and everything? 🙂 That seems way high, so I’m going to be doing some digging. My other site, by the way, has 14 queries. For reference, is there a number of queries that’s “typical”, or a “you’re not going to get below x queries, so don’t try”?

    Just curious….thanks for all the great information guys!

    I dunno about typical, but my blog config/theme/plugins uses 18 queries.

    Using a plugin like “WP-Cache” will dramatically reduce the load because it will cache the requests. So using this in combination with reducing the queries might get you the best possible gains..



    My blog’s main page:

    * NO cache
    ** 14 requests/second
    ** average 6.8 seconds per request
    ** 100% CPU usage

    * With cache
    ** 23 requests/second
    ** average 3 seconds per request
    ** 5% CPU usage

    this test was performed with ab at concurrency of 100 for 500 requests.

    With wp-cache, you don’t see much improvement under normal circumstances, but under load, there’s a world of difference (see the CPU usage).

    Okay…wp-cache is enabled and *crossing fingers* running properly. I’ve got the cache timeout set to 86400, as this blog doesn’t accept comments – it’s just once or twice per day posts by the admin, and he can manually toss the cache when he needs it refreshed. Looks like the cache is up and running great! Thanks for all the help!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WordPress and server load’ is closed to new replies.